mirror of
https://github.com/taglib/taglib.git
synced 2025-09-03 11:55:18 -04:00
Avoid overwriting the audio stream when adding an ID3v1 tag to a FLAC file.
This commit is contained in:
@ -258,8 +258,16 @@ bool FLAC::File::save()
|
||||
}
|
||||
|
||||
if(ID3v1Tag()) {
|
||||
seek(-128, End);
|
||||
if(d->hasID3v1) {
|
||||
seek(d->ID3v1Location);
|
||||
}
|
||||
else {
|
||||
seek(0, End);
|
||||
d->ID3v1Location = tell();
|
||||
}
|
||||
|
||||
writeBlock(ID3v1Tag()->render());
|
||||
d->hasID3v1 = true;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user