[FFmpeg-devel] [RFC] [PATCH] ffmpeg vsync

Alexander Strange astrange
Sun Feb 8 04:00:27 CET 2009

On Jan 28, 2009, at 5:41 PM, Baptiste Coudurier wrote:

> Hi guys,
> I was looking an do_video_out function in ffmpeg lately, and I spoted
> this FIXME here since a long time.
> I was wondering what exactly the goal to achieve for vdelta was.
> In the perfect scenario, vdelta should be 0, this is what happen if
> first pts == 0
> Am I forgetting something ?

I noticed the default vsync does the wrong thing for input files using  
h264 + B-pyramid; it duplicates the first frame because it thinks 2  
frames of decoder delay means a dropped frame. With this patch it does  
2 duplicates instead, which is even worse. I didn't send a patch  
because I'm not quite sure what it's meant to do, or what the  
different -vsync options do.

> -        else if (vdelta > 1.1)
> -            nb_frames = lrintf(vdelta);
> +        else if (vdelta > 0.5)
> +            nb_frames += lrintf(vdelta);

Did you mean the +=?

More information about the ffmpeg-devel mailing list