Ticket #133 (closed Bug: Fixed)
Errors in id3 handling, skips into next frame
| Reported by: | matthewsewell | Owned by: | joachim |
|---|---|---|---|
| Priority: | Major | Component: | App Server |
| Version: | 0.8 RC2 | Keywords: | |
| Cc: |
Description
We found that in processID3v2Header method of org.red5.io.mp3.impl.MP3Reader there is some missing error checking. If the size bits in the header are incorrectly set by the encoder such that they do not fit the 0xxxxxxx pattern, the method will try to skip backwards in the file rather than forward, we addressed this by simply anding out the high bit with & 0x07F.
Also, in the same method there is an error in the way it skips past the IDsv2 tag. It skips forward by the size of the tag, but doesn't to take into account that it is already 10 bytes into the tag (the size of the header). If the first synch bits immediately follow the id3v2 tag, data within the first frame can be seen as the synch bits, throwing off every frame. This is fixed by just subtracting 10 from the offset used to skip.
We are attaching 2 patches that should be applied in order.

