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

Baptiste Coudurier baptiste.coudurier
Sat Aug 7 23:48:49 CEST 2010


Hi,

On 8/6/10 5:14 PM, Michael Chinen wrote:
> Hi,
>
> 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)

pos must be set to the underlying format packet start (TS packet, PES 
packet for PS, and GXF packet I think), for raw format this doesn't 
apply of course.

[...]

-- 
Baptiste COUDURIER
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org



More information about the ffmpeg-devel mailing list