aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/flac_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-11 00:05:14 +0100
committerMax Kellermann <max@duempel.org>2009-11-11 00:05:14 +0100
commit884be8e2b33c4ae536ee72ed1783aacdfe35bd6b (patch)
tree582c9da8f6599c9d578e6f261414854aa76c05f1 /src/decoder/flac_plugin.c
parent305de100a7f9ab7c62c4a2f3f447919d98879a3f (diff)
downloadmpd-884be8e2b33c4ae536ee72ed1783aacdfe35bd6b.tar.gz
mpd-884be8e2b33c4ae536ee72ed1783aacdfe35bd6b.tar.xz
mpd-884be8e2b33c4ae536ee72ed1783aacdfe35bd6b.zip
decoder/flac: merged some code into flac_tag_apply_metadata()
Diffstat (limited to 'src/decoder/flac_plugin.c')
-rw-r--r--src/decoder/flac_plugin.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/decoder/flac_plugin.c b/src/decoder/flac_plugin.c
index 1694f71fc..ee80d667a 100644
--- a/src/decoder/flac_plugin.c
+++ b/src/decoder/flac_plugin.c
@@ -268,12 +268,8 @@ flac_tag_load(const char *file, const char *char_tnum)
block = FLAC__metadata_simple_iterator_get_block(it);
if (!block)
break;
- if (block->type == FLAC__METADATA_TYPE_VORBIS_COMMENT) {
- flac_vorbis_comments_to_tag(tag, char_tnum,
- &block->data.vorbis_comment);
- } else if (block->type == FLAC__METADATA_TYPE_STREAMINFO) {
- tag->time = flac_duration(&block->data.stream_info);
- }
+
+ flac_tag_apply_metadata(tag, char_tnum, block);
FLAC__metadata_object_delete(block);
} while (FLAC__metadata_simple_iterator_next(it));
@@ -848,12 +844,8 @@ oggflac_tag_dup(const char *file)
do {
if (!(block = FLAC__metadata_iterator_get_block(it)))
break;
- if (block->type == FLAC__METADATA_TYPE_VORBIS_COMMENT) {
- flac_vorbis_comments_to_tag(ret, NULL,
- &block->data.vorbis_comment);
- } else if (block->type == FLAC__METADATA_TYPE_STREAMINFO) {
- ret->time = flac_duration(&block->data.stream_info);
- }
+
+ flac_tag_apply_metadata(ret, NULL, block);
} while (FLAC__metadata_iterator_next(it));
FLAC__metadata_iterator_delete(it);