[FFmpeg-devel] [PATCH] replace ogg seek function by read_timestamp and generic seek

Måns Rullgård mans
Wed Oct 3 23:17:27 CEST 2007

Rich Felker <dalias at aerifal.cx> writes:

> On Wed, Oct 03, 2007 at 06:53:58PM +0200, Reimar D?ffinger wrote:
>> Hello,
>> On Wed, Oct 03, 2007 at 05:42:36PM +0100, M?ns Rullg?rd wrote:
>> > Rich Felker wrote:
>> > > Shouldn't the generic binary search code handle using the keyframe
>> > > information?
>> > 
>> > That would of course be reasonable, but I can't see that it's being
>> > done.
>> Not possible currently since read_timestamp does not report keyflag or
>> not nor does it return data (the index-based binary search does it
>> though).
>> You could hack it by making read_timestamp only report keyframes, but
>> that would probably slow down the search unnecessarily.
> Umm, just do the binary search as usual, then do a linear search from
> that point to look for a keyframe.

Searching forwards for a keyframe is easy, while searching backwards
is not.  An application can request either.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list