# HG changeset patch # User lu_zero # Date 1244646482 0 # Node ID 43d99d0e12e011fc1c60f0e933fd91a7a902c104 # Parent 7734b5d0fc6cfc70953a5a47ccdf51b5560d824a 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 diff -r 7734b5d0fc6c -r 43d99d0e12e0 rtsp.c --- a/rtsp.c Wed Jun 10 14:56:50 2009 +0000 +++ b/rtsp.c Wed Jun 10 15:08:02 2009 +0000 @@ -1599,6 +1599,9 @@ 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; diff -r 7734b5d0fc6c -r 43d99d0e12e0 rtsp.h --- a/rtsp.h Wed Jun 10 14:56:50 2009 +0000 +++ b/rtsp.h Wed Jun 10 15:08:02 2009 +0000 @@ -151,6 +151,7 @@ RTSP_STATE_IDLE, /**< not initialized */ RTSP_STATE_PLAYING, /**< initialized and receiving data */ RTSP_STATE_PAUSED, /**< initialized, but not receiving data */ + RTSP_STATE_SEEKING, /**< initialized, requesting a seek */ }; /**