mp3agic icon indicating copy to clipboard operation
mp3agic copied to clipboard

Unknown bug or strange behaviour

Open daniksh opened this issue 10 years ago • 3 comments

Here is what I do:

    mp3 = new Mp3File(path, false);
    //Do something with tags
    mp3.save(path + ".new"); 
    File oldFile = new File(path);
    File newFile = new File(path + ".new");
    oldFile.delete();
    newFile.renameTo(oldFile);

After that, the new file always is 400-500 kb big, as if mp3.save() didn't finish writing it to the disk. What am I doing wrong? Thank you in advance

daniksh avatar May 29 '15 07:05 daniksh

I have the same issue, but the resulting file is always 289 bytes.

kuroneko007 avatar Aug 14 '16 08:08 kuroneko007

Seems like if you create the Mp3File with scanfile "false", it doesn't ever load the MPEG frames. So you only end up saving the metadata.

kuroneko007 avatar Aug 14 '16 08:08 kuroneko007

It's hard to know what is going wrong without seeing the mp3. Loading and saving an mp3 with scanfile = true might result in the file being truncated if there are invalid mp3 frames in the file.

mpatric avatar Aug 15 '16 10:08 mpatric