Cannot read Wav that has padding after data and then id3 tag read two bytes out

Issue #266 resolved
IJabz repo owner created an issue

Cannot read Wav that has padding and then id3 tag read two bytes out causing size of chunk to be incorrectly read and attmept to move file pointer to invalid postions.

1> Is this rip invalid or not, not sure 2> How do we deal with padding, are we reading correctly 3> If we delete two bytes preceding id3 it is ok 4> If data was read okay, shoud we care if id3 invalid can we just ignore other chunks 5> Is this common, could we exapnf our 1 byte out of alignment logic to two bytes

Test file is test534.wav

Comments (4)

  1. IJabz reporter

    The problem was not that ID3 was specifically 2 bytes out rather that the large chunk of padding was being read as a 8 byte chunks and id3 chunk that came after this was not on this 8 byte boundary. Can now read a chunk of padding data (not a real chunk) and read real chunks afterwards, the padding data is listed in the tag summary. Can also write to the existing metadata after the padding data, but since the padding data is invalid would be better if actually removed the padding.

  2. IJabz reporter

    Issue #226:Fixed some tests, and also now if we can read the audio data okay then we allow read() to succeed. But we flag in the tag where we have generic badData chunks and we dont allow write() to proceed if there is badData chunks. Now we already supported fixing some bad data such as ID3 tags incorrectly aligned because previous chunk ended on an odd boundary, so if can safetly delete the bad data then we can write these files as well, simply writing the bad data immediately after the audio data but not done yet.

  3. Log in to comment