[FFmpeg-cvslog] avcodec/flashsv2enc: Fix undefined NULL + 0
Andreas Rheinhardt
git at videolan.org
Sat Apr 3 01:18:55 EEST 2021
ffmpeg | branch: release/4.4 | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Fri Mar 26 18:35:25 2021 +0100| [55ad9ece314677e4de41b73230aad042947fa6b0] | committer: Andreas Rheinhardt
avcodec/flashsv2enc: Fix undefined NULL + 0
Affected the vsynth*-flashsv2 FATE-tests.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
(cherry picked from commit b7b73e83e3d5c78a5fea96a6bcae02e1f0a5c45f)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=55ad9ece314677e4de41b73230aad042947fa6b0
---
libavcodec/flashsv2enc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/flashsv2enc.c b/libavcodec/flashsv2enc.c
index 430b6806c8..00aedf0795 100644
--- a/libavcodec/flashsv2enc.c
+++ b/libavcodec/flashsv2enc.c
@@ -159,7 +159,7 @@ static void init_blocks(FlashSV2Context * s, Block * blocks,
b->enc = encbuf;
b->data = databuf;
encbuf += b->width * b->height * 3;
- databuf += !databuf ? 0 : b->width * b->height * 6;
+ databuf = databuf ? databuf + b->width * b->height * 6 : NULL;
}
}
}
More information about the ffmpeg-cvslog
mailing list