vorbis: append data from tags together
authorBen Boeckel <mathstuf@gmail.com>
Wed, 5 Feb 2014 17:10:55 +0000 (12:10 -0500)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 5 Feb 2014 21:36:48 +0000 (22:36 +0100)
Currently, if there are multiple 'performer' tags, the last one is the
only one which appears. Instead, join them with a semicolon.

Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/oggparsevorbis.c

index 36ad738..1c74637 100644 (file)
@@ -155,10 +155,15 @@ int ff_vorbis_comment(AVFormatContext *as, AVDictionary **m,
                     av_log(as, AV_LOG_WARNING, "Failed to parse cover art block.\n");
                     continue;
                 }
-            } else if (!ogm_chapter(as, tt, ct))
+            } else if (!ogm_chapter(as, tt, ct)) {
+                if (m && av_dict_get(*m, tt, NULL, 0)) {
+                    av_dict_set(m, tt, ";", AV_DICT_APPEND);
+                }
                 av_dict_set(m, tt, ct,
                             AV_DICT_DONT_STRDUP_KEY |
-                            AV_DICT_DONT_STRDUP_VAL);
+                            AV_DICT_APPEND);
+                av_freep(&ct);
+            }
         }
     }