decoder/flac: pass FLAC__Metadata_Chain* to FLACMetadataIterator ctor

This commit is contained in:
Max Kellermann 2018-07-07 14:04:06 +02:00
parent 1245b4a49f
commit b0d587ded7
2 changed files with 3 additions and 4 deletions

View File

@ -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();

View File

@ -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() {