mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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:
parent
c079ebdc57
commit
c59a073abe
@ -316,7 +316,7 @@ static av_cold int channelmap_init(AVFilterContext *ctx)
|
|||||||
presence_map = av_calloc(s->nch, sizeof(*presence_map));
|
presence_map = av_calloc(s->nch, sizeof(*presence_map));
|
||||||
for (i = 0; i < s->nch; i++) {
|
for (i = 0; i < s->nch; i++) {
|
||||||
const int out_idx = s->map[i].out_channel_idx;
|
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)
|
if (ret < 0)
|
||||||
break;
|
break;
|
||||||
if (presence_map[out_idx]) {
|
if (presence_map[out_idx]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user