aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-07-18 23:29:42 +0200
committerMax Kellermann <max@duempel.org>2011-07-18 23:31:31 +0200
commit6592ca9f8805c3cf5154626087a01a183c38b6d5 (patch)
tree9008fcf37cc8d1ce530816b36e8132befb37c0b9
parent762712c756fe3041cc60cc4084ef505e56acf57c (diff)
downloadmpd-6592ca9f8805c3cf5154626087a01a183c38b6d5.tar.gz
mpd-6592ca9f8805c3cf5154626087a01a183c38b6d5.tar.xz
mpd-6592ca9f8805c3cf5154626087a01a183c38b6d5.zip
decoder: use AVDictionary instead of AVMetadata
AVMetadata has been deprecated.
-rw-r--r--src/decoder/ffmpeg_decoder_plugin.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/decoder/ffmpeg_decoder_plugin.c b/src/decoder/ffmpeg_decoder_plugin.c
index 156853faf..15ea77f70 100644
--- a/src/decoder/ffmpeg_decoder_plugin.c
+++ b/src/decoder/ffmpeg_decoder_plugin.c
@@ -446,13 +446,26 @@ static const ffmpeg_tag_map ffmpeg_tag_maps[] = {
};
static bool
-ffmpeg_copy_metadata(struct tag *tag, AVMetadata *m,
+ffmpeg_copy_metadata(struct tag *tag,
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,1,0)
+ AVDictionary *m,
+#else
+ AVMetadata *m,
+#endif
const ffmpeg_tag_map tag_map)
{
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,1,0)
+ AVDictionaryEntry *mt = NULL;
+
+ while ((mt = av_dict_get(m, tag_map.name, mt, 0)) != NULL)
+ tag_add_item(tag, tag_map.type, mt->value);
+#else
AVMetadataTag *mt = NULL;
while ((mt = av_metadata_get(m, tag_map.name, mt, 0)) != NULL)
tag_add_item(tag, tag_map.type, mt->value);
+#endif
+
return mt != NULL;
}