From 766b9fd453af163c41bc77aa08fda0988b024d8e Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 2 Feb 2010 12:35:08 +0100 Subject: [PATCH] ffmpeg: read more metadata. --- src/decoder/ffmpeg_decoder_plugin.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/decoder/ffmpeg_decoder_plugin.c b/src/decoder/ffmpeg_decoder_plugin.c index 678bba6fa..10086b34b 100644 --- a/src/decoder/ffmpeg_decoder_plugin.c +++ b/src/decoder/ffmpeg_decoder_plugin.c @@ -387,12 +387,23 @@ ffmpeg_stream_tag(struct input_stream *is) av_metadata_conv(f, NULL, f->iformat->metadata_conv); ffmpeg_copy_metadata(tag, f->metadata, TAG_TITLE, "title"); +#if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(50<<8)) + ffmpeg_copy_metadata(tag, f->metadata, TAG_ARTIST, "artist"); + ffmpeg_copy_metadata(tag, f->metadata, TAG_DATE, "date"); +#else ffmpeg_copy_metadata(tag, f->metadata, TAG_ARTIST, "author"); + ffmpeg_copy_metadata(tag, f->metadata, TAG_DATE, "year"); +#endif ffmpeg_copy_metadata(tag, f->metadata, TAG_ALBUM, "album"); ffmpeg_copy_metadata(tag, f->metadata, TAG_COMMENT, "comment"); ffmpeg_copy_metadata(tag, f->metadata, TAG_GENRE, "genre"); ffmpeg_copy_metadata(tag, f->metadata, TAG_TRACK, "track"); - ffmpeg_copy_metadata(tag, f->metadata, TAG_DATE, "year"); + ffmpeg_copy_metadata(tag, f->metadata, TAG_ARTIST_SORT, "author-sort"); + ffmpeg_copy_metadata(tag, f->metadata, TAG_ALBUM_ARTIST, "album_artist"); + ffmpeg_copy_metadata(tag, f->metadata, TAG_ALBUM_ARTIST_SORT, "album_artist-sort"); + ffmpeg_copy_metadata(tag, f->metadata, TAG_COMPOSER, "composer"); + ffmpeg_copy_metadata(tag, f->metadata, TAG_PERFORMER, "performer"); + ffmpeg_copy_metadata(tag, f->metadata, TAG_DISC, "disc"); #else if (f->author[0]) tag_add_item(tag, TAG_ARTIST, f->author);