1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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

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