[FFmpeg-devel] [PATCH] First shot at AVCHD seeking via new seeking API

Reimar Döffinger Reimar.Doeffinger
Sat Sep 5 22:48:40 CEST 2009


On Sat, Sep 05, 2009 at 09:52:49PM +0200, Ivan Schreter wrote:

No comment on the functionality itself, but

> Index: libavformat/seek.c
> ===================================================================
> --- libavformat/seek.c  (revision 19773)
> +++ libavformat/seek.c  (working copy)
> @@ -342,8 +342,10 @@
> 
>      // Find keyframes in all active streams with timestamp/position 
> just before
>      // and just after requested timestamp/position.
> -    step = 1024;
> -    curpos = pos;
> +    step = 32768;
> +    curpos = pos - step / 2;
> +    if (curpos < 0)
> +        curpos = 0;

curpos = FFMAX(pos - step / 2, 0);



More information about the ffmpeg-devel mailing list