[vlc-commits] video_output: keep the displayed.current in frame by frame if next is not ready
Steve Lhomme
git at videolan.org
Tue Jan 19 12:29:49 UTC 2021
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Nov 17 13:53:06 2020 +0100| [cb7f97ee4dd7742104049ca21309ef285f365612] | committer: Steve Lhomme
video_output: keep the displayed.current in frame by frame if next is not ready
And no need to reuse displayed.next which is always NULL otherwise.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cb7f97ee4dd7742104049ca21309ef285f365612
---
src/video_output/video_output.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 6683fb6ea5..3ecb20d306 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1487,16 +1487,14 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
bool render_now;
if (frame_by_frame)
{
- if (!sys->displayed.next)
- {
- sys->displayed.next =
- ThreadDisplayPreparePicture(vout, false, true, &paused);
- }
+ picture_t *next;
+ next = ThreadDisplayPreparePicture(vout, false, true, &paused);
+ if (next == NULL)
+ return VLC_EGENERIC;
if (likely(sys->displayed.current != NULL))
picture_Release(sys->displayed.current);
- sys->displayed.current = sys->displayed.next;
- sys->displayed.next = NULL;
+ sys->displayed.current = next;
render_now = true;
}
More information about the vlc-commits
mailing list