TianyiShi2001 / audiotags

Unified IO for different types of audio metadata
https://tianyishi2001.github.io/audiotags
MIT License
41 stars 29 forks source link

Fail to write Tag #48

Closed DagBjorndal closed 2 months ago

DagBjorndal commented 2 months ago

I've written a Rust program to clean meta data in my music library.

For some .m4a files in ALAC format, the write_to_path() function fails with Mp4TagError(Io(Error { kind: UnexpectedEof, message: "failed to fill whole buffer" }): Error reading atom length).

For these files; just reading and directly writing back the tag fails:

let mut tag = Tag::new().read_from_path(path.as_path()).unwrap();
tag.write_to_path(path.to_str().unwrap()).unwrap();

As far as I can see, these tags seem fine in other software e.g. Kid3.

pinkforest commented 2 months ago

This needs to be re-producible.

Re-open if it can be re-produced so it can be potentially both tested and fixed if any real bugs found through that.

DagBjorndal commented 2 months ago

This is 100% reproducible for the same media files. The exact same error message is also given using crates mp4meta or mtag.