[vlc-devel] [PATCH 15/21] video_output: return early if we tried to render pictures but none were found

Steve Lhomme robux4 at ycbcr.xyz
Tue Sep 15 14:36:20 CEST 2020


next_render is always INVALID_DEADLINE in this case. It would have been
INVALID_DEADLINE anyway, as there cannot be no displayed.current with a
displayed.date and there cannot be a displayed.next either since
displayed.current is NULL. These are the case where we set a proper next_render
value.
---
 src/video_output/video_output.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index b79f09cca14..badeebb1803 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1500,6 +1500,9 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
             && !ThreadDisplayPreparePicture(vout, false, frame_by_frame, &paused))
             ;
 
+    if (!sys->displayed.current)
+        return VLC_EGENERIC; // wait with no known deadline
+
     const vlc_tick_t system_now = vlc_tick_now();
     const vlc_tick_t render_delay = vout_chrono_GetHigh(&sys->render) + VOUT_MWAIT_TOLERANCE;
 
-- 
2.26.2



More information about the vlc-devel mailing list