diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2009-06-10 15:08:02 +0000 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2009-06-10 15:08:02 +0000 |
commit | ec606b36b419dffbe059ac90a2fe96b5381c8331 (patch) | |
tree | 66e945120bdf5a163f890c660ec85b5b3ab558c0 /libavformat/rtsp.c | |
parent | 4db819bc7f47f1fe41caec63ad6122d2c999c95c (diff) | |
download | ffmpeg-ec606b36b419dffbe059ac90a2fe96b5381c8331.tar.gz |
Support seeking as defined by the rfc
a PLAY with Range alone while in PLAY status should be interpreted
as an enqueue
a PAUSE followed by a PLAY with Range is the proper way to ask to
seek to a point.
See rfc2326
Originally committed as revision 19143 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 1e9f2877df..4cbfd7e49a 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1599,6 +1599,9 @@ static int rtsp_read_seek(AVFormatContext *s, int stream_index, case RTSP_STATE_IDLE: break; case RTSP_STATE_PLAYING: + if (rtsp_read_pause(s) != 0) + return -1; + rt->state = RTSP_STATE_SEEKING; if (rtsp_read_play(s) != 0) return -1; break; |