[FFmpeg-devel] [PATCH] fix pcm_read_seek with negative timestamp

Reimar Döffinger Reimar.Doeffinger
Sat Mar 14 18:26:07 CET 2009


On Sat, Mar 14, 2009 at 05:55:43PM +0100, Michael Niedermayer wrote:
> > > which breaks the API
> > > now, seek2() fixes all that by introducing an API that has no problem
> > > with timestamps that are outside the first..last
> > 
> > I can't find anything in the avformat.h description of av_seek_frame or
> > read_seek which would explain why this should break API, could you be
> > more specific?
> 
> yes, the flags select direction, if you ask for lets say ts=-123 and
> backward and it succeeds with ts=0 (which is not backward) thats just
> not strictly correct.

According to the documentation in avformat.h it is correct:
read_seek doxy: "Selects which direction should be preferred"
Admittedly av_seek_frame doxy is unclear...

> > Also considering that _other_ existing code (e.g. generic index, but I
> > have the suspicion that others, too) already handle timestamps outside
> > first..last like my patch would do, calling it "breaks the API" is a bit
> > of an exaggeration. 
> 
> it does not follow the API, and as we have a new and better API whats
> the point in trying to workaround deficiencies of a API that will be removed?

Well, I mostly wanted to analyze and reduce the seek regression diff of
the GENERIC_INDEX patch.
I have no issue to drop this patch, but then I still need to know if I
can apply the GENERIC_INDEX support patch even if it too breaks API...




More information about the ffmpeg-devel mailing list