]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/flashsv2enc: Fix undefined NULL + 0
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 26 Mar 2021 17:35:25 +0000 (18:35 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Thu, 1 Apr 2021 12:52:43 +0000 (14:52 +0200)
Affected the vsynth*-flashsv2 FATE-tests.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/flashsv2enc.c

index 430b6806c8828bc2e891592b94d73c867322e500..00aedf07953d34d92035729b2a71bedaf2330343 100644 (file)
@@ -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;
         }
     }
 }