avfilter/af_join: pass the correct input layouts to ff_channel_layouts_ref

Should fix memory leaks show in fate-filter-join and fate-filter-crazychannels.

Reviewed-by: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Signed-off-by: James Almer <jamrial@gmail.com>
release/7.1
James Almer 4 months ago
parent a15d2fdfd9
commit 2e91532ead
  1. 2
      libavfilter/af_join.c

@ -215,7 +215,7 @@ static int join_query_formats(const AVFilterContext *ctx,
for (i = 0; i < ctx->nb_inputs; i++) {
layouts = ff_all_channel_layouts();
if ((ret = ff_channel_layouts_ref(layouts, &cfg_in[0]->channel_layouts)) < 0)
if ((ret = ff_channel_layouts_ref(layouts, &cfg_in[i]->channel_layouts)) < 0)
return ret;
}

Loading…
Cancel
Save