From c0a18e884c2d24d1052147082c358cb6929e97f1 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 2 Nov 2023 23:49:53 +0100 Subject: [PATCH] avfilter/buffersink: fix order of operation with = and <0 Reviewed-by: Sean McGovern Reviewed-by: Nicolas George Signed-off-by: Michael Niedermayer --- libavfilter/buffersink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c index 9426ded7ee..ca2af1bc07 100644 --- a/libavfilter/buffersink.c +++ b/libavfilter/buffersink.c @@ -293,7 +293,7 @@ static int asink_query_formats(AVFilterContext *ctx) cleanup_redundant_layouts(ctx); for (i = 0; i < NB_ITEMS(buf->channel_layouts); i++) if ((ret = av_channel_layout_from_mask(&layout, buf->channel_layouts[i])) < 0 || - (ret = ff_add_channel_layout(&layouts, &layout) < 0)) + (ret = ff_add_channel_layout(&layouts, &layout)) < 0) return ret; for (i = 0; i < NB_ITEMS(buf->channel_counts); i++) { layout = FF_COUNT2LAYOUT(buf->channel_counts[i]);