[FFmpeg-devel] ffplay: Incorrect frame_delay?

Marton Balint cus at passwd.hu
Sun May 27 18:24:27 CEST 2012


On Sun, 27 May 2012, Robert Nagy wrote:

> I'm a bit confused.
>
> If you cannot poll for the next frame, and frame_delay should not be
> used. How do you synchronize video?

The idea is the following:
  - if there is no picture in the queue, then you can't do anything
  - if there is only one picture in the queue, then if the picture should 
have been displayed already based on its pts, then you display it no 
matter how late you are.
  - if there is more than one picture in the queue, then you can calculate 
the duration of the picture, because you already know the pts of the next 
picture. Therefore you can decide to drop the first picture, or display 
it.

Frame duration is only used in the third case, when you can calculate it 
easily and reliably.

Regards,
Marton


More information about the ffmpeg-devel mailing list