aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/ffmpeg_plugin.c
diff options
context:
space:
mode:
authorAnton Khirnov <wyskas@gmail.com>2009-08-03 17:40:22 +0200
committerMax Kellermann <max@duempel.org>2009-08-03 17:40:22 +0200
commitbff72634cafb68d53ad8902dee991d644164aa10 (patch)
treec8f6f909c1da999dc051fd583517aff5bd5cd4df /src/decoder/ffmpeg_plugin.c
parent6f060081be272d4a8b1bcf1ad0197de4ea5cd5e3 (diff)
downloadmpd-bff72634cafb68d53ad8902dee991d644164aa10.tar.gz
mpd-bff72634cafb68d53ad8902dee991d644164aa10.tar.xz
mpd-bff72634cafb68d53ad8902dee991d644164aa10.zip
ffmpeg_plugin: convert metadata to generic format
Diffstat (limited to 'src/decoder/ffmpeg_plugin.c')
-rw-r--r--src/decoder/ffmpeg_plugin.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/decoder/ffmpeg_plugin.c b/src/decoder/ffmpeg_plugin.c
index f6003d2f3..e6646f649 100644
--- a/src/decoder/ffmpeg_plugin.c
+++ b/src/decoder/ffmpeg_plugin.c
@@ -353,13 +353,15 @@ ffmpeg_copy_metadata(struct tag *tag, AVMetadata *m,
static bool ffmpeg_tag_internal(struct ffmpeg_context *ctx)
{
struct tag *tag = (struct tag *) ctx->tag;
- const AVFormatContext *f = ctx->format_context;
+ AVFormatContext *f = ctx->format_context;
tag->time = 0;
if (f->duration != (int64_t)AV_NOPTS_VALUE)
tag->time = f->duration / AV_TIME_BASE;
#if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(31<<8)+0)
+ av_metadata_conv(f, NULL, f->iformat->metadata_conv);
+
ffmpeg_copy_metadata(tag, f->metadata, TAG_ITEM_TITLE, "title");
ffmpeg_copy_metadata(tag, f->metadata, TAG_ITEM_ARTIST, "author");
ffmpeg_copy_metadata(tag, f->metadata, TAG_ITEM_ALBUM, "album");