[vlc-devel] [PATCH v3 8/8] video_output: set the deadline as we go
Steve Lhomme
robux4 at ycbcr.xyz
Wed Nov 18 12:56:18 CET 2020
No need for intermediate variable with a confusing name.
---
src/video_output/video_output.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 5794e9aedce..2473e7bb951 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1508,10 +1508,10 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
*/
bool refresh = false;
- vlc_tick_t date_refresh = VLC_TICK_INVALID;
+ *deadline = VLC_TICK_INVALID;
if (sys->displayed.date != VLC_TICK_INVALID) {
- date_refresh = sys->displayed.date + VOUT_REDISPLAY_DELAY - render_delay;
- refresh = date_refresh <= system_now;
+ *deadline = sys->displayed.date + VOUT_REDISPLAY_DELAY - render_delay;
+ refresh = *deadline <= system_now;
}
render_now = refresh;
@@ -1545,11 +1545,10 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
}
}
- if (date_refresh == VLC_TICK_INVALID || pic_render_deadline < date_refresh)
- date_refresh = pic_render_deadline;
+ if (*deadline == VLC_TICK_INVALID || pic_render_deadline < *deadline)
+ *deadline = pic_render_deadline;
}
}
- *deadline = date_refresh;
if (!first && !refresh && !dropped_current_frame) {
// nothing changed, wait until the next deadline or a control
--
2.26.2
More information about the vlc-devel
mailing list