Re: lost synchronization error on ARM PDA!

Rob Leslie <[email protected]>
Newsgroups gmane.comp.audio.mad.devel
Message-ID <[email protected]>
On Jan 18, 2004, at 9:06 AM, zw_0000 wrote:
> hi, I now compile libmad and madplay in a cross compile environment to 
> build target code for PDA with ARM CPU, after I download target code 
> to ARM PDA, whenever I play any mp3 file on ARM machine, the madplay 
> alway tips me the same error:
> decode frame 305 , lost sychronization.
> is this error of libmad or madplay? what cause the error? can any one 
> can tell me.

MAD_ERROR_LOSTSYNC (lost synchronization) is an error returned by 
libmad when it fails to find the requisite sync word at the expected 
location in the bitstream. It usually indicates either (1) a corrupt 
bitstream, or (2) stream buffer mismanagement in your code. Since the 
error is fully recoverable, in the case of (1) the solution is simply 
to continue decoding.

In the case of (2), the most common problem is a failure to copy the 
unconsumed portion of the bitstream to the beginning of the new buffer 
after receiving MAD_ERROR_BUFLEN. However, madplay does this correctly, 
so if you are actually running madplay under ARM unmodified, this 
should not be a problem.

If the error occurs with any MP3 file, especially at the same frame 
index (at the same bitrate), then buffer management is definitely a 
likely culprit.

-- 
Rob Leslie
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.