Re: error recovery?
Rob Leslie <[email protected]>
| Newsgroups | gmane.comp.audio.mad.devel |
|---|---|
| Message-ID | <[email protected]> |
On Nov 28, 2003, at 6:41 AM, Gerd Knorr wrote: > Any hints how to recover from decoding errors, i.e. how to continue > after mad_frame_decode() returned MAD_ERROR_LOSTSYNC? > > Just call mad_stream_buffer() with the next data block and then > mad_frame_decode() again seems not to work. In the mad.h header file > is a function called "mad_stream_sync", should I call that one? > Before calling mad_stream_buffer() or thereafter? As long as MAD_RECOVERABLE(stream.error) is true, you can just ignore the error. The next attempt to decode a frame will recover automatically. -- Rob Leslie [email protected]