diff options
author | David Horn <dhorn2000@gmail.com> | 2009-01-30 09:02:09 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-30 09:02:09 +0100 |
commit | 6314a8137b8d7900377b01465162bcc17005edd6 (patch) | |
tree | ca676cd6be3ed3b0a4da68d43a8bb9fe67097ffd /src | |
parent | 9e51844fe1b700a84b9d685c58dd762034477e5a (diff) | |
download | mpd-6314a8137b8d7900377b01465162bcc17005edd6.tar.gz mpd-6314a8137b8d7900377b01465162bcc17005edd6.tar.xz mpd-6314a8137b8d7900377b01465162bcc17005edd6.zip |
ffmeg: added support for the tags comment, genre, year
ffmpeg_tag_internal() does not look for a few tags that mpd
supports. Most noteably:
comment -> TAG_ITEM_COMMENT -> Description
genre -> TAG_ITEM_GENRE -> WM/Genre (not WM/GenreID)
year -> TAG_ITEM_DATE -> WM/Year
I *think* that this is the last of the tags that AVFormatContext() in
ffmpeg supports that mpd also uses.
Diffstat (limited to 'src')
-rw-r--r-- | src/decoder/ffmpeg_plugin.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/decoder/ffmpeg_plugin.c b/src/decoder/ffmpeg_plugin.c index 7f7978b9d..efad6eb16 100644 --- a/src/decoder/ffmpeg_plugin.c +++ b/src/decoder/ffmpeg_plugin.c @@ -345,6 +345,16 @@ static bool ffmpeg_tag_internal(struct ffmpeg_context *ctx) tag_add_item(tag, TAG_ITEM_TRACK, buffer); } + if (f->comment[0]) + tag_add_item(tag, TAG_ITEM_COMMENT, f->comment); + if (f->genre[0]) + tag_add_item(tag, TAG_ITEM_GENRE, f->genre); + if (f->year > 0) { + char buffer[16]; + snprintf(buffer, sizeof(buffer), "%d", f->year); + tag_add_item(tag, TAG_ITEM_DATE, buffer); + } + return true; } |