[vlc-devel] [PATCH 3/4] video_output: keep the displayed.current in frame by frame if next is not ready
Steve Lhomme
robux4 at ycbcr.xyz
Tue Nov 10 13:27:47 CET 2020
---
src/video_output/video_output.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 0107a195a8e..0a1d1d29d9a 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1487,19 +1487,20 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
bool render_now;
if (frame_by_frame)
{
- picture_Release(sys->displayed.current);
+ picture_t *next;
if (likely(sys->displayed.next == NULL))
- sys->displayed.current =
- ThreadDisplayPreparePicture(vout, false, true, &paused);
+ next = ThreadDisplayPreparePicture(vout, false, true, &paused);
else
{
- sys->displayed.current = sys->displayed.next;
+ next = sys->displayed.next;
sys->displayed.next = NULL;
}
- if (!sys->displayed.current)
+ if (next == NULL)
return VLC_EGENERIC;
+ picture_Release(sys->displayed.current);
+ sys->displayed.current = next;
render_now = true;
}
else
--
2.26.2
More information about the vlc-devel
mailing list