Use ID3v2::FrameFactory also for WAV and DSDIFF (#1172)

* Use ID3v2::FrameFactory also for WAV and DSDIFF

* Apply suggestions from code review

Co-authored-by: Kevin André <hyperquantum@gmail.com>

---------

Co-authored-by: Kevin André <hyperquantum@gmail.com>
This commit is contained in:
Urs Fleisch
2023-11-09 18:58:51 +01:00
committed by GitHub
parent 52b245f015
commit 0e395f4ec4
8 changed files with 41 additions and 19 deletions

View File

@ -812,7 +812,8 @@ void DSDIFF::File::read(bool readProperties, Properties::ReadStyle propertiesSty
}
else if(d->chunks[i].name == "ID3 " || d->chunks[i].name == "id3 ") {
d->id3v2TagChunkID = d->chunks[i].name;
d->tag.set(ID3v2Index, new ID3v2::Tag(this, d->chunks[i].offset));
d->tag.set(ID3v2Index, new ID3v2::Tag(this, d->chunks[i].offset,
d->ID3v2FrameFactory));
d->isID3InPropChunk = false;
d->hasID3v2 = true;
}
@ -841,7 +842,8 @@ void DSDIFF::File::read(bool readProperties, Properties::ReadStyle propertiesSty
continue;
}
d->id3v2TagChunkID = d->childChunks[PROPChunk][i].name;
d->tag.set(ID3v2Index, new ID3v2::Tag(this, d->childChunks[PROPChunk][i].offset));
d->tag.set(ID3v2Index, new ID3v2::Tag(this, d->childChunks[PROPChunk][i].offset,
d->ID3v2FrameFactory));
d->isID3InPropChunk = true;
d->hasID3v2 = true;
}

View File

@ -83,7 +83,7 @@ namespace TagLib {
*
* \note In the current implementation, \a propertiesStyle is ignored.
*
* If this file contains and ID3v2 tag the frames will be created using
* If this file contains an ID3v2 tag, the frames will be created using
* \a frameFactory (default if null).
*/
File(FileName file, bool readProperties = true,
@ -94,7 +94,7 @@ namespace TagLib {
* Constructs an DSDIFF file from \a stream. If \a readProperties is true
* the file's audio properties will also be read.
*
* If this file contains and ID3v2 tag the frames will be created using
* If this file contains an ID3v2 tag, the frames will be created using
* \a frameFactory (default if null).
*
* \note TagLib will *not* take ownership of the stream, the caller is