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

Pierre Ynard git at videolan.org
Sat Jan 29 23:30:43 CET 2011


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

live555: fix test to update NPT

This fixes cases where the stream length is unknown
(cherry picked from commit f085cfc1c95b922e3c750ee93ec58c3f2d5f7456)

Signed-off-by: Pierre Ynard <linkfanel at yahoo.fr>

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

 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 f58541e..b3f4de1 100644
--- a/modules/demux/live555.cpp
+++ b/modules/demux/live555.cpp
@@ -1819,7 +1819,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