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.
This commit is contained in:
David Horn 2009-01-30 09:02:09 +01:00 committed by Max Kellermann
parent 32d6d4499e
commit efb04532df
2 changed files with 12 additions and 0 deletions

2
NEWS
View File

@ -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

View File

@ -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;
}