[vlc-devel] [PATCH v4 8/9] video_output:control: explain why we keep can_sleep to false

Steve Lhomme robux4 at ycbcr.xyz
Fri Dec 18 08:38:27 UTC 2020


This might also be handled out of control.c. The wake could just cause the
cond_timedwait to exit but the state to ignore the deadline and keep popping
mouse states from the control FIFO could be handled in video_output.c.
---
 src/video_output/control.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/video_output/control.c b/src/video_output/control.c
index c5b14887ecb..10bf6d8b033 100644
--- a/src/video_output/control.c
+++ b/src/video_output/control.c
@@ -104,6 +104,8 @@ int vout_control_Pop(vout_control_t *ctrl, vlc_mouse_t *mouse, vlc_tick_t deadli
         has_cmd = true;
         *mouse = ARRAY_VAL(ctrl->cmd, 0);
         ARRAY_REMOVE(ctrl->cmd, 0);
+        // keep can_sleep unset, if it is, so we report all mouse states we have
+        // after we were awaken when a new picture has been pushed by the decoder
     } else {
         ctrl->can_sleep = true;
     }
-- 
2.29.2



More information about the vlc-devel mailing list