summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <[email protected]>2021-03-26 18:35:25 +0100
committerAndreas Rheinhardt <[email protected]>2021-04-02 21:41:55 +0200
commit55ad9ece314677e4de41b73230aad042947fa6b0 (patch)
tree62f6e0fe3ccf1a2bf23d09997e1356e3892ca6aa
parent3d473a89259df5b27065db759af0809809f7a0a6 (diff)
avcodec/flashsv2enc: Fix undefined NULL + 0
Affected the vsynth*-flashsv2 FATE-tests. Signed-off-by: Andreas Rheinhardt <[email protected]> (cherry picked from commit b7b73e83e3d5c78a5fea96a6bcae02e1f0a5c45f)
-rw-r--r--libavcodec/flashsv2enc.c2
1 files changed, 1 insertions, 1 deletions
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;
}
}
}