diff options
author | Max Kellermann <max@duempel.org> | 2009-11-10 21:58:19 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-11-10 21:58:19 +0100 |
commit | e51d9fc6a9902c2ef448abf8f1151964a441d788 (patch) | |
tree | 274cf5d11b3db0d2661919ad828f6e0d62d67c23 /src/decoder/_flac_common.c | |
parent | 2f69831fb8a0ad13236e91b3edbbcd0a7658a5bf (diff) | |
download | mpd-e51d9fc6a9902c2ef448abf8f1151964a441d788.tar.gz mpd-e51d9fc6a9902c2ef448abf8f1151964a441d788.tar.xz mpd-e51d9fc6a9902c2ef448abf8f1151964a441d788.zip |
decoder/flac: pass VorbisComment to comments_to_tag()
Diffstat (limited to 'src/decoder/_flac_common.c')
-rw-r--r-- | src/decoder/_flac_common.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/decoder/_flac_common.c b/src/decoder/_flac_common.c index fca76d11e..33cfd9c3c 100644 --- a/src/decoder/_flac_common.c +++ b/src/decoder/_flac_common.c @@ -199,13 +199,10 @@ flac_parse_comment(struct tag *tag, const char *char_tnum, void flac_vorbis_comments_to_tag(struct tag *tag, const char *char_tnum, - const FLAC__StreamMetadata *block) + const FLAC__StreamMetadata_VorbisComment *comment) { - FLAC__StreamMetadata_VorbisComment_Entry *comments = - block->data.vorbis_comment.comments; - - for (unsigned i = block->data.vorbis_comment.num_comments; i > 0; --i) - flac_parse_comment(tag, char_tnum, comments++); + for (unsigned i = 0; i < comment->num_comments; ++i) + flac_parse_comment(tag, char_tnum, &comment->comments[i]); } void flac_metadata_common_cb(const FLAC__StreamMetadata * block, @@ -223,7 +220,8 @@ void flac_metadata_common_cb(const FLAC__StreamMetadata * block, flac_parse_replay_gain(block, data); if (data->tag != NULL) - flac_vorbis_comments_to_tag(data->tag, NULL, block); + flac_vorbis_comments_to_tag(data->tag, NULL, + &block->data.vorbis_comment); default: break; |