mirror of
https://github.com/taglib/taglib.git
synced 2025-11-16 14:42:52 -05:00
Always read tags from the first Vorbis Comment block in FLAC files
Prevously TagLib saved tags to the first block, but read them from the last one. Having multiple VC blocks is a non-standard situation, but this is the best we can do (libFLAC also uses the first block in the case of multiple VC blocks). BUG:211089 git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1043985 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
@ -406,7 +406,6 @@ void FLAC::File::scan()
|
||||
nextBlockOffset += length + 4;
|
||||
|
||||
// Search through the remaining metadata
|
||||
|
||||
while(!isLastBlock) {
|
||||
|
||||
header = readBlock(4);
|
||||
@ -416,8 +415,13 @@ void FLAC::File::scan()
|
||||
|
||||
// Found the vorbis-comment
|
||||
if(blockType == VorbisComment) {
|
||||
d->xiphCommentData = readBlock(length);
|
||||
d->hasXiphComment = true;
|
||||
if(!d->hasXiphComment) {
|
||||
d->xiphCommentData = readBlock(length);
|
||||
d->hasXiphComment = true;
|
||||
}
|
||||
else {
|
||||
debug("FLAC::File::scan() -- multiple Vorbis Comment blocks found, using the first one");
|
||||
}
|
||||
}
|
||||
|
||||
nextBlockOffset += length + 4;
|
||||
|
||||
Reference in New Issue
Block a user