[vlc-commits] live555: fix test to update NPT

Pierre Ynard git at videolan.org
Sat Jan 29 23:14:03 CET 2011


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Sat Jan 29 23:12:35 2011 +0100| [f085cfc1c95b922e3c750ee93ec58c3f2d5f7456] | committer: Pierre Ynard

live555: fix test to update NPT

This fixes cases where the stream length is unknown

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f085cfc1c95b922e3c750ee93ec58c3f2d5f7456
---

 modules/demux/live555.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules/demux/live555.cpp b/modules/demux/live555.cpp
index c8bd82e..1e8f522 100644
--- a/modules/demux/live555.cpp
+++ b/modules/demux/live555.cpp
@@ -1886,7 +1886,8 @@ static void StreamRead( void *p_private, unsigned int i_size,
     }
 
     /* Update our global npt value */
-    if( tk->i_npt > 0 && tk->i_npt > p_sys->i_npt && tk->i_npt < p_sys->i_npt_length)
+    if( tk->i_npt > 0 && tk->i_npt > p_sys->i_npt &&
+        ( tk->i_npt < p_sys->i_npt_length || p_sys->i_npt_length <= 0 ) )
         p_sys->i_npt = tk->i_npt;
 
     if( p_block )



More information about the vlc-commits mailing list