diff rtsp.c @ 5677:545f70d48943 libavformat

Make rtsp_close_streams() take a AVFormatContext instead of a RTSPState argument, so we can use AVFormatContext->* here in the future. Patch by Martin Storsj <$firstname $firstname st>.
author rbultje
date Fri, 19 Feb 2010 23:10:19 +0000
parents 7fa188f69c22
children 76cb8ea11c47
line wrap: on
line diff
--- a/rtsp.c	Fri Feb 19 22:13:19 2010 +0000
+++ b/rtsp.c	Fri Feb 19 23:10:19 2010 +0000
@@ -572,8 +572,9 @@
 }
 
 /* close and free RTSP streams */
-static void rtsp_close_streams(RTSPState *rt)
+static void rtsp_close_streams(AVFormatContext *s)
 {
+    RTSPState *rt = s->priv_data;
     int i;
     RTSPStream *rtsp_st;
 
@@ -1421,7 +1422,7 @@
     }
     return 0;
  fail:
-    rtsp_close_streams(rt);
+    rtsp_close_streams(s);
     av_freep(&content);
     url_close(rt->rtsp_hd);
     if (reply->status_code >=300 && reply->status_code < 400) {
@@ -1759,7 +1760,7 @@
              s->filename);
     rtsp_send_cmd_async(s, cmd);
 
-    rtsp_close_streams(rt);
+    rtsp_close_streams(s);
     url_close(rt->rtsp_hd);
     return 0;
 }
@@ -1839,14 +1840,13 @@
     }
     return 0;
 fail:
-    rtsp_close_streams(rt);
+    rtsp_close_streams(s);
     return err;
 }
 
 static int sdp_read_close(AVFormatContext *s)
 {
-    RTSPState *rt = s->priv_data;
-    rtsp_close_streams(rt);
+    rtsp_close_streams(s);
     return 0;
 }