[vlc-devel] [PATCH v3 7/8] video_output: only set the deadline in non frame-by-frame mode
Steve Lhomme
robux4 at ycbcr.xyz
Wed Nov 18 12:56:17 CET 2020
---
src/video_output/video_output.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 992ea095d01..5794e9aedce 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1465,9 +1465,6 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
}
vlc_mutex_unlock(&sys->filter.lock);
- if (deadline)
- *deadline = VLC_TICK_INVALID;
-
bool render_now;
if (frame_by_frame)
{
@@ -1489,7 +1486,10 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
sys->displayed.current =
ThreadDisplayPreparePicture(vout, first, false, &paused);
if (!sys->displayed.current)
+ {
+ *deadline = VLC_TICK_INVALID;
return VLC_EGENERIC; // wait with no known deadline
+ }
}
const vlc_tick_t system_now = vlc_tick_now();
@@ -1549,8 +1549,7 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
date_refresh = pic_render_deadline;
}
}
- if (date_refresh != VLC_TICK_INVALID)
- *deadline = date_refresh;
+ *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