[vlc-commits] demux/mp4: fixup of f695cf0

Filip Roséen git at videolan.org
Tue Nov 22 20:38:15 CET 2016


vlc | branch: master | Filip Roséen <filip at atch.se> | Thu Nov 17 05:21:10 2016 +0100| [8ea4f4f71b744ec3da24830e866389b5f2e25155] | committer: Francois Cartegnie

demux/mp4: fixup of f695cf0

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.

Signed-off-by: Francois Cartegnie <fcvlcdev at free.fr>

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

 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 315c1b4..b3553d7 100644
--- a/modules/demux/mp4/meta.c
+++ b/modules/demux/mp4/meta.c
@@ -314,8 +314,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 )
@@ -406,13 +413,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 )



More information about the vlc-commits mailing list