aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtspdec.c
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2011-01-24 09:49:04 +0000
committerMichael Niedermayer <michaelni@gmx.at>2011-01-26 03:43:28 +0100
commit2afd30bf7ab098f7471d851dc5f7a9adad43d35a (patch)
treef0d5ea97ba6756c9fbfd731dc03ae0aaaf3b5da4 /libavformat/rtspdec.c
parent3f44e3c91ab2a4737c9790bc4fe2362ff1ea2e0a (diff)
downloadffmpeg-2afd30bf7ab098f7471d851dc5f7a9adad43d35a.tar.gz
rtspdec: Move rtsp_read_pause up, next to rtsp_read_play
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net> (cherry picked from commit e836b1b0859798488d8ba45a837dc27bac2ee99f)
Diffstat (limited to 'libavformat/rtspdec.c')
-rw-r--r--libavformat/rtspdec.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c
index eb7de3b663..b910d4cdb9 100644
--- a/libavformat/rtspdec.c
+++ b/libavformat/rtspdec.c
@@ -86,6 +86,24 @@ static int rtsp_read_play(AVFormatContext *s)
return 0;
}
+/* pause the stream */
+static int rtsp_read_pause(AVFormatContext *s)
+{
+ RTSPState *rt = s->priv_data;
+ RTSPMessageHeader reply1, *reply = &reply1;
+
+ if (rt->state != RTSP_STATE_STREAMING)
+ return 0;
+ else if (!(rt->server_type == RTSP_SERVER_REAL && rt->need_subscription)) {
+ ff_rtsp_send_cmd(s, "PAUSE", rt->control_uri, NULL, reply, NULL);
+ if (reply->status_code != RTSP_STATUS_OK) {
+ return -1;
+ }
+ }
+ rt->state = RTSP_STATE_PAUSED;
+ return 0;
+}
+
int ff_rtsp_setup_input_streams(AVFormatContext *s, RTSPMessageHeader *reply)
{
RTSPState *rt = s->priv_data;
@@ -292,24 +310,6 @@ static int rtsp_read_packet(AVFormatContext *s, AVPacket *pkt)
return 0;
}
-/* pause the stream */
-static int rtsp_read_pause(AVFormatContext *s)
-{
- RTSPState *rt = s->priv_data;
- RTSPMessageHeader reply1, *reply = &reply1;
-
- if (rt->state != RTSP_STATE_STREAMING)
- return 0;
- else if (!(rt->server_type == RTSP_SERVER_REAL && rt->need_subscription)) {
- ff_rtsp_send_cmd(s, "PAUSE", rt->control_uri, NULL, reply, NULL);
- if (reply->status_code != RTSP_STATUS_OK) {
- return -1;
- }
- }
- rt->state = RTSP_STATE_PAUSED;
- return 0;
-}
-
static int rtsp_read_seek(AVFormatContext *s, int stream_index,
int64_t timestamp, int flags)
{