[vlc-devel] [PATCH 02/21] video_output: set the deadline early when there was a previous frame displayed
Steve Lhomme
robux4 at ycbcr.xyz
Tue Sep 15 14:36:07 CEST 2020
date_refresh is now a local variable.
We replace the test on frame_by_frame by a test on deadline not being NULL, as
it makes more sense when setting its value.
---
src/video_output/video_output.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index ef801f344b1..906734b2cb1 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1514,10 +1514,11 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
*/
bool refresh = false;
- vlc_tick_t date_refresh = VLC_TICK_INVALID;
if (sys->displayed.date != VLC_TICK_INVALID) {
- date_refresh = sys->displayed.date + VOUT_REDISPLAY_DELAY - render_delay;
+ const vlc_tick_t date_refresh = sys->displayed.date + VOUT_REDISPLAY_DELAY - render_delay;
refresh = date_refresh <= system_now;
+ if (deadline)
+ *deadline = date_refresh;
}
if (!paused && sys->displayed.next) {
@@ -1540,8 +1541,6 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
bool force_refresh = !drop_next_frame && refresh;
if (!frame_by_frame) {
- if (date_refresh != VLC_TICK_INVALID)
- *deadline = date_refresh;
if (date_next != VLC_TICK_INVALID && date_next < *deadline)
*deadline = date_next;
}
--
2.26.2
More information about the vlc-devel
mailing list