From b0d587ded78778075cdbd4122453574c5518728d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 7 Jul 2018 14:04:06 +0200 Subject: [PATCH] decoder/flac: pass FLAC__Metadata_Chain* to FLACMetadataIterator ctor --- src/decoder/plugins/FlacMetadata.cxx | 2 +- src/decoder/plugins/FlacMetadata.hxx | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/decoder/plugins/FlacMetadata.cxx b/src/decoder/plugins/FlacMetadata.cxx index a4150f6ef..9f1bc9073 100644 --- a/src/decoder/plugins/FlacMetadata.cxx +++ b/src/decoder/plugins/FlacMetadata.cxx @@ -163,7 +163,7 @@ flac_vorbis_comments_to_tag(const FLAC__StreamMetadata_VorbisComment *comment) void FlacMetadataChain::Scan(TagHandler &handler) noexcept { - FLACMetadataIterator iterator(*this); + FLACMetadataIterator iterator(chain); do { FLAC__StreamMetadata *block = iterator.GetBlock(); diff --git a/src/decoder/plugins/FlacMetadata.hxx b/src/decoder/plugins/FlacMetadata.hxx index 02a5f1f6b..e84119b31 100644 --- a/src/decoder/plugins/FlacMetadata.hxx +++ b/src/decoder/plugins/FlacMetadata.hxx @@ -91,10 +91,9 @@ class FLACMetadataIterator { public: FLACMetadataIterator():iterator(::FLAC__metadata_iterator_new()) {} - FLACMetadataIterator(FlacMetadataChain &chain) + FLACMetadataIterator(FLAC__Metadata_Chain *chain) :iterator(::FLAC__metadata_iterator_new()) { - ::FLAC__metadata_iterator_init(iterator, - (FLAC__Metadata_Chain *)chain); + ::FLAC__metadata_iterator_init(iterator, chain); } ~FLACMetadataIterator() {