From d41d8cf983c3e05cd0ed72c446fc889c75040138 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 3 Apr 2023 21:34:10 +0200 Subject: [PATCH] audioconvert: fix return values Return negative error numbers for errors. --- spa/plugins/audioconvert/audioconvert.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spa/plugins/audioconvert/audioconvert.c b/spa/plugins/audioconvert/audioconvert.c index 76f80df6d..7a67710f5 100644 --- a/spa/plugins/audioconvert/audioconvert.c +++ b/spa/plugins/audioconvert/audioconvert.c @@ -1142,7 +1142,7 @@ static int apply_props(struct impl *this, const struct spa_pod *param) void *sequence = NULL; if (p->volume == p->prev_volume) { spa_log_error(this->log, "no change in volume, cannot ramp volume"); - return EIO; + return -EIO; } else if (p->volume > p->prev_volume) sequence = generate_ramp_up_seq(this); else @@ -1150,7 +1150,7 @@ static int apply_props(struct impl *this, const struct spa_pod *param) if (!sequence) { spa_log_error(this->log, "unable to generate sequence"); - return EIO; + return -EIO; } this->vol_ramp_sequence = (struct spa_pod_sequence *) sequence; this->vol_ramp_offset = 0;