On Nov 27, 2005, at 1:38 PM, Sónia Gonçalves wrote:
I've using libmad, and I want to decode a mp3 file, but I get the following decoding errors.
this example is for a very small mp3.
decoding error 0x0101 (lost synchronization) at byte offset 0 decoding error 0x0102 (reserved header layer value) at byte offset 67 decoding error 0x0101 (lost synchronization) at byte offset 85 decoding error 0x0101 (lost synchronization) at byte offset 104
but most of the times I get the following, this example is for another mp3 file,
decoding error 0x0101 (lost synchronization) at byte offset 0 decoding error 0x0101 (lost synchronization) at byte offset 6034865
it seems that I get errors at the begin and at the end of the offsets.
Should I worry with this ? I does it happen? If someone could help me.. ;)
Lost synchronization errors are common at the beginning and end of files, because there is often other metadata prepended or appended, such as an ID3 or similar tag. You will also often get errors if an MP3 file has been spliced without regard to frame boundaries or the bit reservoir. These are all recoverable errors, and can usually be ignored -- indeed there probably isn't much you can do to correct it anyway.
The errors are provided as a hint so that you can inspect the stream, for example in case you wanted to read an embedded ID3 tag.