[FFmpeg-cvslog] r19143 - in trunk/libavformat: rtsp.c rtsp.h

lu_zero subversion
Wed Jun 10 17:08:02 CEST 2009


Author: lu_zero
Date: Wed Jun 10 17:08:02 2009
New Revision: 19143

Log:
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

Modified:
   trunk/libavformat/rtsp.c
   trunk/libavformat/rtsp.h

Modified: trunk/libavformat/rtsp.c
==============================================================================
--- trunk/libavformat/rtsp.c	Wed Jun 10 16:56:50 2009	(r19142)
+++ trunk/libavformat/rtsp.c	Wed Jun 10 17:08:02 2009	(r19143)
@@ -1599,6 +1599,9 @@ static int rtsp_read_seek(AVFormatContex
     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;

Modified: trunk/libavformat/rtsp.h
==============================================================================
--- trunk/libavformat/rtsp.h	Wed Jun 10 16:56:50 2009	(r19142)
+++ trunk/libavformat/rtsp.h	Wed Jun 10 17:08:02 2009	(r19143)
@@ -151,6 +151,7 @@ enum RTSPClientState {
     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 */
 };
 
 /**



More information about the ffmpeg-cvslog mailing list