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

Reimar Döffinger Reimar.Doeffinger
Sat Mar 14 17:15:49 CET 2009


On Sat, Mar 14, 2009 at 03:41:54PM +0100, Michael Niedermayer wrote:
> On Sat, Mar 14, 2009 at 12:04:44PM +0100, Reimar D?ffinger wrote:
> > Hello,
> > currently pcm_read seek for negative timestamps either seeks somewhere
> > before data_offset (clearly broken) or fails (possibly broken).
> 
> > This patch treats negative time stamps as 0, which would be
> 
> 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?
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. And seeking somewhere before data_offset breaks
everything, not just the API.




More information about the ffmpeg-devel mailing list