avcodec/zerocodec: Avoid undefined NULL - 0

Fixes the zerocodec FATE-test.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
pull/388/head
Andreas Rheinhardt 2 years ago
parent bf8e40ae0d
commit 1e1ddbb70d
  1. 5
      libavcodec/zerocodec.c

@ -84,11 +84,12 @@ static int zerocodec_decode_frame(AVCodecContext *avctx, AVFrame *pic,
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
if (!(avpkt->flags & AV_PKT_FLAG_KEY)) if (!(avpkt->flags & AV_PKT_FLAG_KEY)) {
for (j = 0; j < avctx->width << 1; j++) for (j = 0; j < avctx->width << 1; j++)
dst[j] += prev[j] & -!dst[j]; dst[j] += prev[j] & -!dst[j];
prev -= prev_pic->linesize[0]; prev -= prev_pic->linesize[0];
}
dst -= pic->linesize[0]; dst -= pic->linesize[0];
} }

Loading…
Cancel
Save