diff options
author | Max Kellermann <max@duempel.org> | 2009-10-03 16:17:02 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-10-03 16:17:02 +0200 |
commit | 7013f9fc3105a4e928cbd87bb177325e9b26bbc6 (patch) | |
tree | 353ca385fca5ab75aedabb2fd8948b2316e48afe /src/decoder/ffmpeg_plugin.c | |
parent | 31cabc751d2dc6721706d878a0694afc83ef6a0c (diff) | |
parent | 325e380b8e44fd07a3e477e8fcfed9e6e1c80e7f (diff) | |
download | mpd-7013f9fc3105a4e928cbd87bb177325e9b26bbc6.tar.gz mpd-7013f9fc3105a4e928cbd87bb177325e9b26bbc6.tar.xz mpd-7013f9fc3105a4e928cbd87bb177325e9b26bbc6.zip |
Merged release 0.15.4 from branch 'v0.15.x'
Conflicts:
NEWS
configure.ac
Diffstat (limited to 'src/decoder/ffmpeg_plugin.c')
-rw-r--r-- | src/decoder/ffmpeg_plugin.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/decoder/ffmpeg_plugin.c b/src/decoder/ffmpeg_plugin.c index e6646f649..6bead85fd 100644 --- a/src/decoder/ffmpeg_plugin.c +++ b/src/decoder/ffmpeg_plugin.c @@ -339,7 +339,7 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input) } #if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(31<<8)+0) -static void +static bool ffmpeg_copy_metadata(struct tag *tag, AVMetadata *m, enum tag_type type, const char *name) { @@ -347,6 +347,7 @@ ffmpeg_copy_metadata(struct tag *tag, AVMetadata *m, while ((mt = av_metadata_get(m, name, mt, 0)) != NULL) tag_add_item(tag, type, mt->value); + return mt != NULL; } #endif @@ -363,7 +364,9 @@ static bool ffmpeg_tag_internal(struct ffmpeg_context *ctx) 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"); + if (!ffmpeg_copy_metadata(tag, f->metadata, TAG_ITEM_ARTIST, "author")) + ffmpeg_copy_metadata(tag, f->metadata, + TAG_ITEM_ARTIST, "artist"); ffmpeg_copy_metadata(tag, f->metadata, TAG_ITEM_ALBUM, "album"); ffmpeg_copy_metadata(tag, f->metadata, TAG_ITEM_COMMENT, "comment"); ffmpeg_copy_metadata(tag, f->metadata, TAG_ITEM_GENRE, "genre"); |