[FFmpeg-devel] [PATCH] fix seeking and index generation

Michael Chinen mchinen
Sat Aug 7 02:14:19 CEST 2010


This patch fixes seeking for methods that use a stream's index_entries.
index_entries[i]->pos was being set wrong (not at the start of frame headers.)
index based Seeking seemed to work before because most decoders or
parsers handle this,
but some cases like at the end of the file av_read_frame_internal
would try to create
indexes that contain several indexes with the same pos for different timestamps.
Also it means that the seeking could be inaccurate in some cases and even
more so for parsers that buffer several frames (FLAC)

It adds a new variable to AVCodecParserContext to accomplish this.
I thought to remove the old next_frame_offset and curr_offset, but it
looks like these
are still in use by ff_fetch_timestamp for keeping track of frame boundries.
If they should or could be removed please let me know and I'll change the patch.

This will break seeking tests since the refs were presumably seeking
to wrong positions.
The patch fails tests at lavf-gxf - does this test or rely on seeking?
I would like to run the tests, so can someone tell me how to skip?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-seeking-index_entries-table-based-seeking-pos-va.patch
Type: application/octet-stream
Size: 2435 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100807/b9597372/attachment.obj>

More information about the ffmpeg-devel mailing list