[vlc-devel] [PATCH 2/5] demux/mp4: fixup of f695cf0

Filip Roséen filip at atch.se
Thu Nov 17 05:21:10 CET 2016


The mentioned commit inaccurately assumed that every path within
SetupmdirMeta requires the "metadata" box to have a child of type
"data", which is not the case.

These changes simply changes the behavior so that we invoke the
correct parsing mechanism when it is applicable.
---
 modules/demux/mp4/meta.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/modules/demux/mp4/meta.c b/modules/demux/mp4/meta.c
index ac9095f..a7f5764 100644
--- a/modules/demux/mp4/meta.c
+++ b/modules/demux/mp4/meta.c
@@ -317,8 +317,15 @@ static int ExtractIntlStrings( vlc_meta_t *p_meta, MP4_Box_t *p_box )
 static void SetupmdirMeta( vlc_meta_t *p_meta, MP4_Box_t *p_box )
 {
     const MP4_Box_t *p_data = MP4_BoxGet( p_box, "data" );
+
     if( p_data == NULL || !BOXDATA(p_data) )
+    {
+        if( ExtractIntlStrings( p_meta, p_box ) )
+            return;
+
+        SetMeta( p_meta, p_box->i_type, NULL, p_box );
         return;
+    }
 
     /* XXX Becarefull p_udta can have box that are not 0xa9xx */
     switch( p_box->i_type )
@@ -409,13 +416,10 @@ static void SetupmdirMeta( vlc_meta_t *p_meta, MP4_Box_t *p_box )
         }
         break;
     }
-
     default:
-        if ( !ExtractIntlStrings( p_meta, p_box ) )
-             SetMeta( p_meta, p_box->i_type, NULL, p_box );
+        SetMeta( p_meta, p_box->i_type, NULL, p_box );
         break;
     }
-
 }
 
 static void SetupmdtaMeta( vlc_meta_t *p_meta, MP4_Box_t *p_box, MP4_Box_t *p_keys )
-- 
2.10.2



More information about the vlc-devel mailing list