[FFmpeg-cvslog] rtsp: Move rtsp_read_close

Jordi Ortiz git at videolan.org
Thu Jul 12 00:03:06 CEST 2012


ffmpeg | branch: master | Jordi Ortiz <nenjordi at gmail.com> | Wed Jul  4 22:13:40 2012 +0200| [6bbb36221897b341282d7d403b98270ba52dd6fb] | committer: Martin Storsjö

rtsp: Move rtsp_read_close

This avoids having to add forward declarations in the following
RTSP listen mode commit.

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6bbb36221897b341282d7d403b98270ba52dd6fb
---

 libavformat/rtspdec.c |   28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c
index 063e825..6226f41 100644
--- a/libavformat/rtspdec.c
+++ b/libavformat/rtspdec.c
@@ -31,6 +31,20 @@
 #include "rdt.h"
 #include "url.h"
 
+static int rtsp_read_close(AVFormatContext *s)
+{
+    RTSPState *rt = s->priv_data;
+
+    ff_rtsp_send_cmd_async(s, "TEARDOWN", rt->control_uri, NULL);
+
+    ff_rtsp_close_streams(s);
+    ff_rtsp_close_connections(s);
+    ff_network_close();
+    rt->real_setup = NULL;
+    av_freep(&rt->real_setup_cache);
+    return 0;
+}
+
 static int rtsp_read_play(AVFormatContext *s)
 {
     RTSPState *rt = s->priv_data;
@@ -380,20 +394,6 @@ static int rtsp_read_seek(AVFormatContext *s, int stream_index,
     return 0;
 }
 
-static int rtsp_read_close(AVFormatContext *s)
-{
-    RTSPState *rt = s->priv_data;
-
-    ff_rtsp_send_cmd_async(s, "TEARDOWN", rt->control_uri, NULL);
-
-    ff_rtsp_close_streams(s);
-    ff_rtsp_close_connections(s);
-    ff_network_close();
-    rt->real_setup = NULL;
-    av_freep(&rt->real_setup_cache);
-    return 0;
-}
-
 static const AVClass rtsp_demuxer_class = {
     .class_name     = "RTSP demuxer",
     .item_name      = av_default_item_name,



More information about the ffmpeg-cvslog mailing list