video_output: avoid dropping special pictures
- Sep 15, 2021
-
-
Steve Lhomme authored
They can stay as long as necessary. As soon as they arrive they can be displayed, even if late. They may eventually replaced by another (still) picture.
41ff07dc -
Steve Lhomme authored
This was somehow ensured by the force flag set on the first picture by the decoder, via the b_force flag.
32f36e32 -
Steve Lhomme authored
PreparePicture() returns the first non-late frame or NULL. But if this is the first frame and there's no frame after, we still want to display it. This was somehow ensured by the force flag set on the first picture by the decoder, via the b_force flag, but it's cleaner and more explicit here.
2e4ea598 -
Steve Lhomme authored
By default render_now is true, meaning we want to do the swap without any delay. It should only be set to false when we switch to a new picture that is not late, i.e. we should display it on time. When using the "redisplay" mechanism either we want to redisplay in this call and refresh is true, we don't need to set render_now to true, as it's the default value. When we don't redisplay (refresh = false) we don't need to set render_now because we are not going to do the rendering (it can't be the first and we didn't drop the current frame in this call). We will return VLC_EGENERIC. So we can leave it to true regardless of what we'll do with the "redisplay".
9fb3032d
-