Commit d72d22ae authored by flx42's avatar flx42 Committed by Jean-Baptiste Kempf
Browse files

vout: remove flag is_sleeping from vout_control_t

Previously, the is_sleeping flag was not set to true if a deadline was
passed to vout_control_Pop. Consequently, the condition variable would
not be signalled by function vout_control_Wake, called by
vout_PutPicture to give a vout a picture to display. Thus, the vout
would not wake up even when receiving several pictures, instead the
vout waits until the end of the deadline. If the deadline was computed
as the "refresh" deadline from ThreadDisplayPicture, the sleep time
can be as high as 60-70 ms.
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <>
parent 121c7fc1
......@@ -62,7 +62,6 @@ void vout_control_Init(vout_control_t *ctrl)
ctrl->is_dead = false;
ctrl->is_sleeping = false;
ctrl->can_sleep = true;
ctrl->is_processing = false;
......@@ -115,8 +114,7 @@ void vout_control_Wake(vout_control_t *ctrl)
ctrl->can_sleep = false;
if (ctrl->is_sleeping)
......@@ -190,10 +188,8 @@ int vout_control_Pop(vout_control_t *ctrl, vout_control_cmd_t *cmd,
/* Spurious wakeups are perfectly fine */
if (deadline <= VLC_TS_INVALID) {
ctrl->is_sleeping = true;
if (ctrl->can_sleep)
vlc_cond_timedwait(&ctrl->wait_request, &ctrl->lock, max_deadline);
ctrl->is_sleeping = false;
} else {
vlc_cond_timedwait(&ctrl->wait_request, &ctrl->lock, __MIN(deadline, max_deadline));
......@@ -107,7 +107,6 @@ typedef struct {
/* */
bool is_dead;
bool is_sleeping;
bool can_sleep;
bool is_processing;
DECL_ARRAY(vout_control_cmd_t) cmd;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment