summaryrefslogtreecommitdiff
path: root/libavformat/rtspdec.c
diff options
context:
space:
mode:
authorJordi Ortiz <nenjordi@gmail.com>2012-07-04 22:13:40 +0200
committerMartin Storsjö <martin@martin.st>2012-07-10 21:20:34 +0300
commit6bbb36221897b341282d7d403b98270ba52dd6fb (patch)
tree2e488ad1bd2f5e39a5350d6b0aac3e6754ceec28 /libavformat/rtspdec.c
parent45b068580b8c7d65a4422b47f2b98b258cf9587b (diff)
downloadffmpeg-6bbb36221897b341282d7d403b98270ba52dd6fb.tar.gz
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@martin.st>
Diffstat (limited to 'libavformat/rtspdec.c')
-rw-r--r--libavformat/rtspdec.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c
index 063e82501c..6226f41660 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,