Message ID | 20240911174009.4709-1-jamrial@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] avfilter/af_join: pass the correct input layouts to ff_channel_layouts_ref | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
Quoting James Almer (2024-09-11 19:40:09) > Should fix memory leaks show in fate-filter-join and fate-filter-crazychannels. > > Signed-off-by: James Almer <jamrial@gmail.com> > --- > libavfilter/af_join.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c > index db0320aa70..0ea53248b6 100644 > --- a/libavfilter/af_join.c > +++ b/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) LGTM /me facepalms thanks for the fix
diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c index db0320aa70..0ea53248b6 100644 --- a/libavfilter/af_join.c +++ b/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; }
Should fix memory leaks show in fate-filter-join and fate-filter-crazychannels. Signed-off-by: James Almer <jamrial@gmail.com> --- libavfilter/af_join.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)