[vlc-commits] demux: mp4: fix regression with false frag discontinuities

Francois Cartegnie git at videolan.org
Fri Jan 27 11:32:47 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Jan 27 11:31:48 2017 +0100| [e3c336289e2753a29e3fca2e80d463f74e779c36] | committer: Francois Cartegnie

demux: mp4: fix regression with false frag discontinuities

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

 modules/demux/mp4/mp4.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index d63c69b..9ca7517 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -5100,6 +5100,10 @@ static void LeafCheckandSetMOOFOffset( demux_t *p_demux, MP4_Box_t *p_vroot, MP4
 {
     demux_sys_t *p_sys = p_demux->p_sys;
 
+    /* Only on start of moof parsing */
+    if( p_sys->context.i_mdatbytesleft != 0 )
+        return;
+
     MP4_Box_t *p_mfhd = MP4_BoxGet( p_moof, "mfhd" );
     if( p_mfhd && BOXDATA(p_mfhd) )
     {



More information about the vlc-commits mailing list