[vlc-commits] demux: mp4: skip failed boxes in containers

Francois Cartegnie git at videolan.org
Mon Aug 22 10:56:25 CEST 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Aug 22 10:18:52 2016 +0800| [fa8d43327488b3d205188aeacc76349e9d6f1efa] | committer: Francois Cartegnie

demux: mp4: skip failed boxes in containers

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

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

diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index ffdd99e..819fedd 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -259,7 +259,6 @@ static MP4_Box_t *MP4_ReadBoxRestricted( stream_t *p_stream, MP4_Box_t *p_father
     {
         msg_Warn( p_stream, "Failed reading box %4.4s", (char*) &peekbox.i_type );
         MP4_BoxFree( p_box );
-        return NULL;
     }
 
     /* Check is we consumed all data */
@@ -269,7 +268,8 @@ static MP4_Box_t *MP4_ReadBoxRestricted( stream_t *p_stream, MP4_Box_t *p_father
         MP4_Seek( p_stream, i_next );
     }
 
-    MP4_BoxAddChild( p_father, p_box );
+    if ( p_box )
+        MP4_BoxAddChild( p_father, p_box );
 
     return p_box;
 }



More information about the vlc-commits mailing list