[FFmpeg-devel] [PATCH] Fix Ogg data_offset computation.

Aaron Colwell acolwell
Fri Nov 19 00:04:45 CET 2010

> If (in your example) only the first audio packet is demuxed and then
> a seek is done, the video packet will never be demuxer and thus
> data_offset will stay wrong.

You are right. I've attached a new patch that makes sure that
data_offset is set properly before ogg_get_headers() returns. This
should prevent the scenario you described.

A proper fix means you have to set data_offset already when the

> first packet is read/parsed.
> Concerning "valid Ogg file or not" I can only think, valid it may be,
> it just would be nice to find something one could call a "sane Ogg file".

I agree that it would be nice to have a stronger definition of "sane", but
unfortunately stuff like this appears to be par for the course in ogg.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ogg_data_offset.patch
Type: text/x-patch
Size: 896 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101118/d19b65c1/attachment.bin>

More information about the ffmpeg-devel mailing list