aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Horn <dhorn2000@gmail.com>2009-01-30 09:02:09 +0100
committerMax Kellermann <max@duempel.org>2009-01-30 09:42:49 +0100
commitefb04532df68a52c7e8911d210b271298bc45d1f (patch)
treea710111638ff92457f2edac16f7e04459ee56750
parent32d6d4499e315a5a2f224beaa54faad03ff80a16 (diff)
downloadmpd-efb04532df68a52c7e8911d210b271298bc45d1f.tar.gz
mpd-efb04532df68a52c7e8911d210b271298bc45d1f.tar.xz
mpd-efb04532df68a52c7e8911d210b271298bc45d1f.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 '')
-rw-r--r--NEWS2
-rw-r--r--src/decoder/ffmpeg_plugin.c10
2 files changed, 12 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 88d52f09d..0b3ab53a0 100644
--- a/NEWS
+++ b/NEWS
@@ -35,6 +35,8 @@ ver 0.15 - (200?/??/??)
ver 0.14.2 (2009/??/??)
+* decoders:
+ - ffmpeg: added support for the tags comment, genre, year
* audio outputs:
- jack: allocate ring buffers before connecting
- jack: clear "shutdown" flag on reconnect
diff --git a/src/decoder/ffmpeg_plugin.c b/src/decoder/ffmpeg_plugin.c
index fbbc70ee1..f75109268 100644
--- a/src/decoder/ffmpeg_plugin.c
+++ b/src/decoder/ffmpeg_plugin.c
@@ -347,6 +347,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;
}