[FFmpeg-devel] Seeking to out-of-bounds timestamps

Wolfram Gloger wmglo
Thu Jun 25 13:05:49 CEST 2009

> From: Michael Niedermayer <michaelni at gmx.at>
> Maybe you have missed the proposed new seeking API
> avformat_seek_file()

No I haven't, I'm trying to improve the status quo
(maybe also improve avformat_seek_file as it's currently
using the old code always).

> anyway, i dont think your patch does anything beyond that it would
> break seeking in the few formats where it works currently

How so?

> If you can explain some positive effect beyond that iam all ears

Well if I specify AVSEEK_FLAG_BACKWARD then the expectation that the
seeked-to timestamp is <= the one specified is totally reasonable --
do you actually disagree with this?

> making function A behave like function B of course not a positive
> effect as such.

So you're not interested in consistent behaviour?

> and changing the regression test checksums should really raise a red
> flag, the effect of this wil be vissible to the user as seeking will
> fail

I strongly prefer a failure to silently reaching some state
inconsistent with the specified timestamps -- which also
depends on other (random) circumstances like whether an
index exists or not.

The patch is certainly not changing any checksums but (of course)
changes the seek results.  I'm actually trying to improve the
seek regression test and have further patches for that.
Please take a look at the seek results for b-lavf.nut -- all that
is tested is the seek to beginning and end of file!?
So I sincerely hope this "test" is not cast in stone..


More information about the ffmpeg-devel mailing list