[mad-dev] mad_stream_skip to seek to a new frame
Rob Leslie
rob at mars.org
Tue Jun 19 09:32:20 PDT 2007
On Jun 8, 2007, at 12:21 AM, www.bigcab at free.fr 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 at mars.org
More information about the mad-dev
mailing list