[FFmpeg-cvslog] avcodec/libxevd: Fix "if (ret = ff_foo() < 0)" precedence problem

Andreas Rheinhardt git at videolan.org
Fri Mar 1 02:41:23 EET 2024


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Tue Feb 27 20:41:57 2024 +0100| [fbf1e5135298b7c8e8f6ca2680b41b4af9ed4e4f] | committer: Andreas Rheinhardt

avcodec/libxevd: Fix "if (ret = ff_foo() < 0)" precedence problem

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 libavcodec/libxevd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/libxevd.c b/libavcodec/libxevd.c
index 23ea22f792..c6c7327e65 100644
--- a/libavcodec/libxevd.c
+++ b/libavcodec/libxevd.c
@@ -204,7 +204,8 @@ static int libxevd_image_copy(struct AVCodecContext *avctx, XEVD_IMGB *imgb, str
         }
     }
 
-    if (ret = ff_get_buffer(avctx, frame, 0) < 0)
+    ret = ff_get_buffer(avctx, frame, 0);
+    if (ret < 0)
         return ret;
 
     av_image_copy(frame->data, frame->linesize, (const uint8_t **)imgb->a,



More information about the ffmpeg-cvslog mailing list