lavfi/af_channelmap: fix channelmap_init error handling

The channelmap_init function was returning success even on error after
7dc81d33c2 due to shadowing of the
outer ret variable.

Fixes CID1619297 Logically dead code
This commit is contained in:
Marvin Scholz 2024-09-11 21:07:29 +02:00
parent c079ebdc57
commit c59a073abe

View File

@ -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]) {