aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarvin Scholz <epirat07@gmail.com>2024-09-11 21:07:29 +0200
committerMarvin Scholz <epirat07@gmail.com>2024-09-13 19:12:58 +0200
commitc59a073abe9e13fc22035048e3f7c47527503222 (patch)
treebe1e4d2ffbaf938779db4f188f04f63b9cc5f540
parentc079ebdc57962e3474c149db76480f9d060a96a1 (diff)
downloadffmpeg-c59a073abe9e13fc22035048e3f7c47527503222.tar.gz
lavfi/af_channelmap: fix channelmap_init error handling
The channelmap_init function was returning success even on error after 7dc81d33c241b9e176ea85956e8317f29bc9e3c0 due to shadowing of the outer ret variable. Fixes CID1619297 Logically dead code
-rw-r--r--libavfilter/af_channelmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c
index f5209a10cd..7a99ac7780 100644
--- a/libavfilter/af_channelmap.c
+++ b/libavfilter/af_channelmap.c
@@ -316,7 +316,7 @@ static av_cold int channelmap_init(AVFilterContext *ctx)
presence_map = av_calloc(s->nch, sizeof(*presence_map));
for (i = 0; i < s->nch; i++) {
const int out_idx = s->map[i].out_channel_idx;
- int ret = check_idx_and_id(ctx, out_idx, s->map[i].out_channel, &s->output_layout, "out");
+ ret = check_idx_and_id(ctx, out_idx, s->map[i].out_channel, &s->output_layout, "out");
if (ret < 0)
break;
if (presence_map[out_idx]) {