On Jun 8, 2007, at 12:21 AM,
www.bigcab@... wrote:
> I think I can use mad_stream_skip to seek a new frame but I always
> got a lost sync error
>
> I don't understand?
mad_stream_skip() is useful for skipping objects within the stream
that have a known size, such as ID3 tags. It works by ignoring the
specified number of bytes in the stream, even if they span multiple
buffers.
For general seeking, you can simply pass a new buffer to
mad_stream_buffer() at the point you wish to resume decoding. Note
that an initial sync error is completely normal and benign.
--
Rob Leslie
rob@...