[vlc-devel] commit: Updated the length in rtsp on PLAY request only	if defined. ( Laurent Aimar )
    git version control 
    git at videolan.org
       
    Thu Jul  9 21:54:32 CEST 2009
    
    
  
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Thu Jul  9 21:52:03 2009 +0200| [2067333a32a0163df9baa8745e5fef1360876f7f] | committer: Laurent Aimar 
Updated the length in rtsp on PLAY request only if defined.
It will fix interoperability with live555 server.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2067333a32a0163df9baa8745e5fef1360876f7f
---
 modules/demux/live555.cpp |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/demux/live555.cpp b/modules/demux/live555.cpp
index 23160c3..7a1cd66 100644
--- a/modules/demux/live555.cpp
+++ b/modules/demux/live555.cpp
@@ -1078,7 +1078,8 @@ static int Play( demux_t *p_demux )
 
     /* Retrieve the starttime if possible */
     p_sys->i_npt_start = p_sys->ms->playStartTime();
-    p_sys->i_npt_length = p_sys->ms->playEndTime();
+    if( p_sys->ms->playEndTime() > 0 )
+        p_sys->i_npt_length = p_sys->ms->playEndTime();
 
     msg_Dbg( p_demux, "play start: %f stop:%f", p_sys->i_npt_start, p_sys->i_npt_length );
     return VLC_SUCCESS;
@@ -1286,7 +1287,8 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
                 p_sys->i_npt = p_sys->i_npt_start = p_sys->ms->playStartTime();
 
                 /* Retrieve the duration if possible */
-                p_sys->i_npt_length = p_sys->ms->playEndTime();
+                if( p_sys->ms->playEndTime() > 0 )
+                    p_sys->i_npt_length = p_sys->ms->playEndTime();
 
                 msg_Dbg( p_demux, "seek start: %f stop:%f", p_sys->i_npt_start, p_sys->i_npt_length );
                 return VLC_SUCCESS;
@@ -1421,7 +1423,8 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             p_sys->i_npt_start = p_sys->ms->playStartTime();
 
             /* Retrieve the duration if possible */
-            p_sys->i_npt_length = p_sys->ms->playEndTime();
+            if( p_sys->ms->playEndTime() )
+                p_sys->i_npt_length = p_sys->ms->playEndTime();
 
             msg_Dbg( p_demux, "pause start: %f stop:%f", p_sys->i_npt_start, p_sys->i_npt_length );
             return VLC_SUCCESS;
    
    
More information about the vlc-devel
mailing list