aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-06-25 08:43:59 +0200
committerMax Kellermann <max@duempel.org>2009-06-25 08:43:59 +0200
commiteacd6045187b2d8b64f9c2e0f467145889a16795 (patch)
tree42a4ab44f14de0a899e44c5b0caccc167d9c2913
parent637c6a1850963638018e57b70ae3b807c3028a1d (diff)
downloadmpd-eacd6045187b2d8b64f9c2e0f467145889a16795.tar.gz
mpd-eacd6045187b2d8b64f9c2e0f467145889a16795.tar.xz
mpd-eacd6045187b2d8b64f9c2e0f467145889a16795.zip
ffmpeg: support multiple tags
Call av_metadata_get() in a loop.
-rw-r--r--NEWS2
-rw-r--r--src/decoder/ffmpeg_plugin.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index e064f67cc..94941fc21 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,6 @@
ver 0.16 (20??/??/??)
+* decoders:
+ - ffmpeg: support multiple tags
* mixers:
- removed support for legacy mixer configuration
* commands:
diff --git a/src/decoder/ffmpeg_plugin.c b/src/decoder/ffmpeg_plugin.c
index abccdf977..03c46a732 100644
--- a/src/decoder/ffmpeg_plugin.c
+++ b/src/decoder/ffmpeg_plugin.c
@@ -342,8 +342,9 @@ static void
ffmpeg_copy_metadata(struct tag *tag, AVMetadata *m,
enum tag_type type, const char *name)
{
- AVMetadataTag *mt = av_metadata_get(m, name, NULL, 0);
- if (mt != NULL)
+ AVMetadataTag *mt = NULL;
+
+ while ((mt = av_metadata_get(m, name, mt, 0)) != NULL)
tag_add_item(tag, type, mt->value);
}
#endif