avcodec/zerocodec: Avoid undefined NULL - 0

Fixes the zerocodec FATE-test.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2022-09-27 20:29:41 +02:00
parent bf8e40ae0d
commit 1e1ddbb70d
1 changed files with 3 additions and 2 deletions

View File

@ -84,11 +84,12 @@ static int zerocodec_decode_frame(AVCodecContext *avctx, AVFrame *pic,
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++)
dst[j] += prev[j] & -!dst[j];
prev -= prev_pic->linesize[0];
}
prev -= prev_pic->linesize[0];
dst -= pic->linesize[0];
}