[vlc-commits] demux: mp4: create dummy sample info for mp4s (fix #13464)

Francois Cartegnie git at videolan.org
Fri Jan 2 16:47:11 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Jan  2 16:45:45 2015 +0100| [da5c616b452f2cbeb83a2a1c0356561528e6e974] | committer: Francois Cartegnie

demux: mp4: create dummy sample info for mp4s (fix #13464)

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

 modules/demux/mp4/libmp4.c |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index 08c669c..7faaaa8 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -2149,10 +2149,17 @@ void MP4_FreeBox_sample_vide( MP4_Box_t *p_box )
 
 static int MP4_ReadBox_sample_mp4s( stream_t *p_stream, MP4_Box_t *p_box )
 {
-    if ( MP4_Seek( p_stream, p_box->i_pos + mp4_box_headersize( p_box ) + 8 ) )
-        return 0;
+    p_box->i_handler = ATOM_text;
+    MP4_READBOX_ENTER_PARTIAL( MP4_Box_data_sample_text_t, 16 );
+    if( i_read < 8 )
+        MP4_READBOX_EXIT( 0 );
+
     MP4_ReadBoxContainerRaw( p_stream, p_box );
-    return 1;
+
+    if ( MP4_Seek( p_stream, p_box->i_pos + p_box->i_size ) )
+        MP4_READBOX_EXIT( 0 );
+
+    MP4_READBOX_EXIT( 1 );
 }
 
 static int MP4_ReadBox_sample_text( stream_t *p_stream, MP4_Box_t *p_box )



More information about the vlc-commits mailing list