mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-12-13 22:22:31 +00:00
Don't allow writing an ID3v2 footer in WAV/AIFF
This commit is contained in:
parent
e01d875e05
commit
99d4bdc9c2
1 changed files with 4 additions and 2 deletions
|
@ -29,10 +29,12 @@ pub(crate) fn write_id3v2<'a, I: Iterator<Item = FrameRef<'a>> + 'a>(
|
|||
Some(FileType::APE | FileType::MP3) => {},
|
||||
// Formats such as WAV and AIFF store the ID3v2 tag in an 'ID3 ' chunk rather than at the beginning of the file
|
||||
Some(FileType::WAV) => {
|
||||
return chunk_file::write_to_chunk_file::<LittleEndian>(data, &create_tag(tag)?)
|
||||
tag.flags.footer = false;
|
||||
return chunk_file::write_to_chunk_file::<LittleEndian>(data, &create_tag(tag)?);
|
||||
},
|
||||
Some(FileType::AIFF) => {
|
||||
return chunk_file::write_to_chunk_file::<BigEndian>(data, &create_tag(tag)?)
|
||||
tag.flags.footer = false;
|
||||
return chunk_file::write_to_chunk_file::<BigEndian>(data, &create_tag(tag)?);
|
||||
},
|
||||
_ => return Err(LoftyError::new(ErrorKind::UnsupportedTag)),
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue