avfilter/buffersink: fix order of operation with = and <0

Reviewed-by: Sean McGovern <gseanmcg@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2023-11-02 23:49:53 +01:00
parent 9450a4a7fe
commit c0a18e884c
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
1 changed files with 1 additions and 1 deletions

View File

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