changeset 5013:43d99d0e12e0 libavformat

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
author lu_zero
date Wed, 10 Jun 2009 15:08:02 +0000
parents 7734b5d0fc6c
children 54fa3d7ab724
files rtsp.c rtsp.h
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;
--- 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 */
 };
 
 /**