[FFmpeg-cvslog] avcodec/flashsv2enc: Fix undefined NULL + 0
Andreas Rheinhardt
git at videolan.org
Thu Apr 1 17:12:35 EEST 2021
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Fri Mar 26 18:35:25 2021 +0100| [b7b73e83e3d5c78a5fea96a6bcae02e1f0a5c45f] | 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>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b7b73e83e3d5c78a5fea96a6bcae02e1f0a5c45f
---
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