[FFmpeg-devel] [PATCH] replace ogg seek function by read_timestamp and generic seek
Wed Oct 3 16:53:43 CEST 2007
Reimar D?ffinger wrote:
> On Wed, Oct 03, 2007 at 02:52:52PM +0100, M?ns Rullg?rd wrote:
>> Reimar D?ffinger wrote:
>> > Hello,
>> > the ogg seek function is quite complex and doesn't work that well
>> > either, attached patch would remove it and instead add a working
>> > read_timestamp function so we will use our generic binary search seek.
>> > Split in two patches of course ;-)
>> > Slightly related to issue 159.
>> Does it work? If you're poking at the Ogg demuxer, you might want to
>> look at http://git.mansr.com/?p=ffmpeg.mru;a=commitdiff;h=fdc03d5 as
> It works fine for the one (94 MB) file I tested it with. Though with
> mplayer you should use -nocache, because the cache implementation sucks
> and thus seeking might almost take a second with it set to 10 MB.
> And I am not really looking at the ogg demuxer but only at issue 159 ;-)
> (not to mention that I was never really a fan of
> seeking-only-to-keyframes which I guess this is supposed to fix).
That change makes the demuxer report keyframes for Theora and OGM
streams. It doesn't do anything with the information. What is the
preferred way of implementing seeking to keyframes nowadays? Rich
was complaining about the Ogg demuxer not doing this yesterday on IRC.
> Though I do wonder if
> + if(*p & 8)
> + os->pflags |= PKT_FLAG_KEY;
> is supposed to work in general or if it is theora-specific...
That bit is only for OGM. Theora keyframes are detected elsewhere.
mans at mansr.com
More information about the ffmpeg-devel