[vlc-devel] [PATCH v3 09/18] video_output: use the rendering delay when we were given a deadline to wait for
Steve Lhomme
robux4 at ycbcr.xyz
Tue Aug 18 16:58:36 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 794105813b1..1689d789670 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1843,7 +1843,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;
}
@@ -1859,8 +1865,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