[FFmpeg-cvslog] avfilter/buffersink: fix order of operation with = and <0

Michael Niedermayer git at videolan.org
Sat Nov 4 00:56:04 EET 2023


ffmpeg | branch: release/6.0 | Michael Niedermayer <michael at niedermayer.cc> | Thu Nov  2 23:49:53 2023 +0100| [d77be99a8367ea87a4a0ce837f8d8f9eb987d1d3] | committer: Michael Niedermayer

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

Reviewed-by: Sean McGovern <gseanmcg at gmail.com>
Reviewed-by: Nicolas George <george at nsup.org>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit c0a18e884c2d24d1052147082c358cb6929e97f1)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d77be99a8367ea87a4a0ce837f8d8f9eb987d1d3
---

 libavfilter/buffersink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
index 306c283f77..9ab83696ce 100644
--- a/libavfilter/buffersink.c
+++ b/libavfilter/buffersink.c
@@ -291,7 +291,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]);



More information about the ffmpeg-cvslog mailing list