diff options
author | Max Kellermann <max@duempel.org> | 2009-01-15 19:53:07 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-15 19:53:07 +0100 |
commit | 8307dd3e873e7ed7c72ae26ee7d2a8ea505c3336 (patch) | |
tree | a459ec796178b68c8f36ba70bd0429250b232028 /src/decoder/flac_plugin.c | |
parent | 86dc79293f97254c67a4b4170881495d4b05c4ae (diff) | |
download | mpd-8307dd3e873e7ed7c72ae26ee7d2a8ea505c3336.tar.gz mpd-8307dd3e873e7ed7c72ae26ee7d2a8ea505c3336.tar.xz mpd-8307dd3e873e7ed7c72ae26ee7d2a8ea505c3336.zip |
flac: removed "vorbis_comment_found" flag
Use tag_is_empty() instead.
Diffstat (limited to 'src/decoder/flac_plugin.c')
-rw-r--r-- | src/decoder/flac_plugin.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/decoder/flac_plugin.c b/src/decoder/flac_plugin.c index 9ccb0f002..a13042cf3 100644 --- a/src/decoder/flac_plugin.c +++ b/src/decoder/flac_plugin.c @@ -228,14 +228,12 @@ flac_write_cb(const flac_decoder *dec, const FLAC__Frame *frame, } static struct tag * -flac_tag_load(const char *file, bool *vorbis_comment_found) +flac_tag_load(const char *file) { struct tag *ret = NULL; FLAC__Metadata_SimpleIterator *it; FLAC__StreamMetadata *block = NULL; - *vorbis_comment_found = false; - it = FLAC__metadata_simple_iterator_new(); if (!FLAC__metadata_simple_iterator_init(it, file, 1, 0)) { const char *err; @@ -267,10 +265,7 @@ flac_tag_load(const char *file, bool *vorbis_comment_found) if (!block) break; if (block->type == FLAC__METADATA_TYPE_VORBIS_COMMENT) { - ret = flac_vorbis_comments_to_tag(block, ret); - - if (ret) - *vorbis_comment_found = true; + flac_vorbis_comments_to_tag(block, ret); } else if (block->type == FLAC__METADATA_TYPE_STREAMINFO) { if (!ret) ret = tag_new(); @@ -289,14 +284,13 @@ static struct tag * flac_tag_dup(const char *file) { struct tag *ret = NULL; - bool vorbis_comment_found = false; - ret = flac_tag_load(file, &vorbis_comment_found); + ret = flac_tag_load(file); if (!ret) { g_debug("Failed to grab information from: %s\n", file); return NULL; } - if (!vorbis_comment_found) { + if (tag_is_empty(ret)) { struct tag *temp = tag_id3_load(file); if (temp) { temp->time = ret->time; |