avcodec/ffv1dec: Fix end computation with ec=2

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 10e5af15bf)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/7.1
Michael Niedermayer 4 months ago
parent 2a39eeb8de
commit 26fc4bf42c
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 2
      libavcodec/ffv1dec.c

@ -347,7 +347,7 @@ static int decode_slice(AVCodecContext *c, void *arg)
if (f->ac != AC_GOLOMB_RICE && f->version > 2) {
int v;
get_rac(&sc->c, (uint8_t[]) { 129 });
v = sc->c.bytestream_end - sc->c.bytestream - 2 - 5*f->ec;
v = sc->c.bytestream_end - sc->c.bytestream - 2 - 5*!!f->ec;
if (v) {
av_log(f->avctx, AV_LOG_ERROR, "bytestream end mismatching by %d\n", v);
slice_set_damaged(f, sc);

Loading…
Cancel
Save