mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Avoid overwriting the audio stream when adding an ID3v1 tag to a FLAC file.
This commit is contained in:
parent
f830177b3b
commit
fa17b4da6b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user