[vlc-commits] demux: libmp4: don't return empty root
Francois Cartegnie
git at videolan.org
Mon May 8 18:42:17 CEST 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri May 5 20:48:46 2017 +0200| [4efdadf652f8cb14da60d979aa20d4c7ad411155] | committer: Francois Cartegnie
demux: libmp4: don't return empty root
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4efdadf652f8cb14da60d979aa20d4c7ad411155
---
modules/demux/mp4/libmp4.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index 25daa2ea8c..5c43fbfee8 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -4664,7 +4664,12 @@ MP4_Box_t *MP4_BoxGetNextChunk( stream_t *s )
MP4_ReadBoxContainerChildren( s, p_fakeroot, stoplist );
p_tmp_box = p_fakeroot->p_first;
- while( p_tmp_box )
+ if( p_tmp_box == NULL )
+ {
+ MP4_BoxFree( p_fakeroot );
+ return NULL;
+ }
+ else while( p_tmp_box )
{
p_fakeroot->i_size += p_tmp_box->i_size;
p_tmp_box = p_tmp_box->p_next;
More information about the vlc-commits
mailing list