Trouble writing tag to mpeg file containing only audio data #219
-
EDIT: for anyone else seeing this, this was a bug which was fixed in #227 I don't know for certain whether I've run into a bug or if I'm just not using lofty correctly. I've got mpeg files containing essentially nothing but audio[1] to which I'm trying to write a new self.tag.re_map(TagType::VorbisComments);
self.tag.save_to_path(path)?; I've tried the same for the mpeg files, namely let tag: Id3v2Tag = self.tag.into();
let mut mpeg_file = MpegFile::read_from(&mut file_handler, ParseOptions::default())?;
let _ = mpeg_file.set_id3v2(tag); I'd like to know the correct way to write the tag. If the above should already work or the correct way doesn't after testing I'll go ahead and open a proper bug report. If needed I can also provide one of the mpeg mp3 files which fails. [1] Afaik at least, looking at the file with a hex-editor it starts with zeroes until |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
Hello! The first example when using The second example is only setting the tag for the file in memory, you'll need to either do
Lofty will skip invalid padding at the start of MPEG files, so that shouldn't be an issue. If the above doesn't work, you can email the file to |
Beta Was this translation helpful? Give feedback.
@sandersantema This was actually simpler to fix than I thought. Could you test out #227 and see if it's able to determine the format now?