[vlc-devel] [PATCH 5/5] demux/mp4: fix handling of com.apple.quicktime metadata

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


The previous implementation would ignore metadata keys unless there
was a mapping to both AppleNameToMeta, and AtomXA9ToMeta, which is of
course erroneous.
---
 modules/demux/mp4/meta.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mp4/meta.c b/modules/demux/mp4/meta.c
index c310c34..0254df6 100644
--- a/modules/demux/mp4/meta.c
+++ b/modules/demux/mp4/meta.c
@@ -220,9 +220,11 @@ static bool SetMeta( vlc_meta_t* p_meta, int i_type, char const* name, MP4_Box_t
     vlc_meta_type_t const* type;
     char const* key;
 
-    if( ( name && !AppleNameToMeta( name, &type, &key ) ) ||
-                  !AtomXA9ToMeta( i_type, &type, &key ) )
+    if( ( name != NULL && !AppleNameToMeta( name, &type, &key ) ) ||
+        ( name == NULL && !AtomXA9ToMeta( i_type, &type, &key ) ) )
+    {
         return false;
+    }
 
     char* psz_utf = ExtractString( p_box );
 
-- 
2.10.2



More information about the vlc-devel mailing list