[vlc-devel] [PATCH v2 03/18] video_output: set the deadline early when there was a previous frame displayed
Steve Lhomme
robux4 at ycbcr.xyz
Wed Sep 16 13:14:29 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 c5e65d53d20..4eb60894431 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 != NULL)
+ *deadline = date_refresh;
}
if (!paused && sys->displayed.next) {
@@ -1535,8 +1536,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