[vlc-commits] demux: read chunk if pos + sample size > target (fix #11166)

Francois Cartegnie git at videolan.org
Tue Apr 8 13:10:43 CEST 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Apr  8 10:52:50 2014 +0200| [f687992b8b2c3f46416c6e0ef0d3a945f5928e1b] | committer: Francois Cartegnie

demux: read chunk if pos + sample size > target (fix #11166)

If first chunk is greater than first samples duration, the
data is never read/sent.
(segmented mp4 related, demux tries to read 100ms (CLOCK_FREQ/10)
- [0] duration=133ms media time=-1ms) rate=1.0
- [1] duration=667034ms media time=66ms) rate=1.0

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

 modules/demux/mp4/mp4.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index d21edb7..2e2a122 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -720,7 +720,8 @@ static int Demux( demux_t *p_demux )
         if( !tk->b_ok || tk->b_chapter || !tk->b_selected || tk->i_sample >= tk->i_sample_count )
             continue;
 
-        while( MP4_TrackGetDTS( p_demux, tk ) < i_targettime )
+        while( MP4_TrackGetDTS( p_demux, tk ) < i_targettime
+               || ( p_sys->i_pcr == VLC_TS_INVALID && !b_data_sent ) )
         {
 #if 0
             msg_Dbg( p_demux, "tk(%i)=%lld mv=%lld", i_track,



More information about the vlc-commits mailing list