[vlc-devel] [PATCH v5 15/24] video_output: use the rendering delay when we were given a deadline to wait for
Steve Lhomme
robux4 at ycbcr.xyz
Mon Aug 24 09:41:56 CEST 2020
Otherwise we don't need to estimate the needed control deadline. We either
don't wait or use a hardcoded deadline of 100 ms before we try to render again.
---
src/video_output/video_output.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 0542b520ed3..fa913522311 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1837,7 +1837,13 @@ static void *Thread(void *object)
if (wait)
{
const vlc_tick_t max_deadline = vlc_tick_now() + VLC_TICK_FROM_MS(100);
- deadline = deadline == VLC_TICK_INVALID ? max_deadline : __MIN(deadline, max_deadline);
+ if (deadline == VLC_TICK_INVALID)
+ deadline = max_deadline;
+ else
+ {
+ deadline -= vout_chrono_GetHigh(&sys->render) + VOUT_MWAIT_TOLERANCE;
+ deadline = __MIN(deadline, max_deadline);
+ }
} else {
deadline = VLC_TICK_INVALID;
}
@@ -1853,8 +1859,6 @@ static void *Thread(void *object)
}
wait = ThreadDisplayPicture(vout, &deadline) != VLC_SUCCESS;
- if (deadline != VLC_TICK_INVALID)
- deadline -= vout_chrono_GetHigh(&sys->render) + VOUT_MWAIT_TOLERANCE;
const bool picture_interlaced = sys->displayed.is_interlaced;
--
2.26.2
More information about the vlc-devel
mailing list