[vlc-devel] [PATCH 04/10] vout: control: don't test if we return an error set the error value
Steve Lhomme
robux4 at ycbcr.xyz
Fri Jul 17 13:50:47 CEST 2020
---
src/video_output/control.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/video_output/control.c b/src/video_output/control.c
index bc07b41f00f..6ab8e6e27f0 100644
--- a/src/video_output/control.c
+++ b/src/video_output/control.c
@@ -167,17 +167,17 @@ int vout_control_Pop(vout_control_t *ctrl, vout_control_cmd_t *cmd,
while (ctrl->is_held)
vlc_cond_wait(&ctrl->wait_available, &ctrl->lock);
- bool has_cmd;
+ int ret;
if (ctrl->cmd.i_size > 0) {
- has_cmd = true;
+ ret = VLC_SUCCESS;
*cmd = ARRAY_VAL(ctrl->cmd, 0);
ARRAY_REMOVE(ctrl->cmd, 0);
} else {
- has_cmd = false;
+ ret = VLC_EGENERIC;
ctrl->can_sleep = true;
}
vlc_mutex_unlock(&ctrl->lock);
- return has_cmd ? VLC_SUCCESS : VLC_EGENERIC;
+ return ret;
}
--
2.26.2
More information about the vlc-devel
mailing list