[vlc-commits] demux: mp4: go forward on null sample

Francois Cartegnie git at videolan.org
Thu Jun 5 20:32:20 CEST 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jun  4 20:02:24 2014 +0200| [de39696df92af3790df8f179eb2eca9df87a6ee2] | committer: Francois Cartegnie

demux: mp4: go forward on null sample

Was regression with that tricky one:
http://streams.videolan.org/issues/10981/6.mp4

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

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

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 320d122..906dc54 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -917,10 +917,11 @@ static int Demux( demux_t *p_demux )
             b_data_sent = true;
         }
         es_out_Send( p_demux->out, tk->p_es, p_block );
+    }
 
-        /* Next sample */
+    /* Next sample */
+    if ( i_nb_samples ) /* sample size could be 0, need to go fwd. see return */
         MP4_TrackNextSample( p_demux, tk, i_nb_samples );
-    }
 
 end:
     if ( b_data_sent )
@@ -935,7 +936,7 @@ end:
         }
     }
 
-    return b_data_sent;
+    return b_data_sent || ( i_samplessize == 0 && i_nb_samples );
 }
 
 static void MP4_UpdateSeekpoint( demux_t *p_demux )



More information about the vlc-commits mailing list