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

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:13 2016 +0100| [bf444c6983ff5170b9f6dacee39385bfbcb93912] | committer: Francois Cartegnie

demux/mp4: fix handling of com.apple.quicktime metadata

The previous implementation would ignore metadata keys unless there
was a mapping to both AppleNameToMeta, and AtomXA9ToMeta, which is of
course erroneous.

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

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

 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 f22ebc1..2fb569e 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 );
 



More information about the vlc-commits mailing list