[vlc-devel] [PATCH 13/21] video_output: simplify the is_forced render flag
Steve Lhomme
robux4 at ycbcr.xyz
Tue Sep 15 14:36:18 CEST 2020
If frame_by_frame is true then we need to force the display. And when
frame_by_frame is true display_next_frame is also true.
So if current_needs_redisplay is true but display_next_frame is true as well,
force_refresh is false. But is_forced is still true, since frame_by_frame is
true. So we don't need to care about the value of display_next_frame when
considering current_needs_redisplay, we need to force the display as well (as
the name suggests).
---
src/video_output/video_output.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 3f8263bc11a..37da38e8924 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1564,9 +1564,11 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
}
/* display the picture immediately */
- bool force_refresh = current_needs_redisplay && !display_next_frame;
- bool is_forced = frame_by_frame || force_refresh || sys->displayed.current->b_force;
+ bool is_forced = frame_by_frame || current_needs_redisplay || sys->displayed.current->b_force;
int ret = ThreadDisplayRenderPicture(vout, is_forced);
+
+ // return success (don't wait) only if a new frame was displayed
+ bool force_refresh = current_needs_redisplay && !display_next_frame;
return force_refresh ? VLC_EGENERIC : ret;
}
--
2.26.2
More information about the vlc-devel
mailing list