Commit 7088465f authored by lu_zero's avatar lu_zero

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


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19143 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 20baa783
...@@ -1599,6 +1599,9 @@ static int rtsp_read_seek(AVFormatContext *s, int stream_index, ...@@ -1599,6 +1599,9 @@ static int rtsp_read_seek(AVFormatContext *s, int stream_index,
case RTSP_STATE_IDLE: case RTSP_STATE_IDLE:
break; break;
case RTSP_STATE_PLAYING: case RTSP_STATE_PLAYING:
if (rtsp_read_pause(s) != 0)
return -1;
rt->state = RTSP_STATE_SEEKING;
if (rtsp_read_play(s) != 0) if (rtsp_read_play(s) != 0)
return -1; return -1;
break; break;
......
...@@ -151,6 +151,7 @@ enum RTSPClientState { ...@@ -151,6 +151,7 @@ enum RTSPClientState {
RTSP_STATE_IDLE, /**< not initialized */ RTSP_STATE_IDLE, /**< not initialized */
RTSP_STATE_PLAYING, /**< initialized and receiving data */ RTSP_STATE_PLAYING, /**< initialized and receiving data */
RTSP_STATE_PAUSED, /**< initialized, but not receiving data */ RTSP_STATE_PAUSED, /**< initialized, but not receiving data */
RTSP_STATE_SEEKING, /**< initialized, requesting a seek */
}; };
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment