[vlc-devel] [PATCH] dash: libmp4: skip meta in moov atom

jpsaman at gmail.com jpsaman at gmail.com
Thu Aug 18 21:00:13 CEST 2016


From: Jean-Paul Saman <jpsaman at videolan.org>

MPEG DASH streams with meta in moov atom did not play while other players can.
---
 modules/demux/mp4/libmp4.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index ffdd99e..fc2f97b 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -3563,6 +3563,10 @@ static int MP4_ReadBox_meta( stream_t *p_stream, MP4_Box_t *p_box )
             return 0;
     }
 
+    if ( p_box->p_father &&
+         p_box->p_father->i_type == ATOM_moov ) /* moov/meta */
+        return MP4_ReadBoxContainerChildren( p_stream, p_box, NULL );
+
     const uint32_t stoplist[] = { ATOM_hdlr, 0 };
     if ( !MP4_ReadBoxContainerChildren( p_stream, p_box, stoplist ) )
         return 0;
@@ -3994,6 +3998,7 @@ static const struct
     { ATOM_cmov,    MP4_ReadBox_cmov,         0 },
     { ATOM_mvhd,    MP4_ReadBox_mvhd,         ATOM_moov },
     { ATOM_mvhd,    MP4_ReadBox_mvhd,         ATOM_foov },
+    { ATOM_meta,    MP4_ReadBox_meta,         ATOM_moov },
     { ATOM_tkhd,    MP4_ReadBox_tkhd,         ATOM_trak },
     { ATOM_load,    MP4_ReadBox_load,         ATOM_trak },
     { ATOM_mdhd,    MP4_ReadBox_mdhd,         ATOM_mdia },
-- 
2.5.5



More information about the vlc-devel mailing list