[FFmpeg-cvslog] avcodec/zerocodec: Avoid undefined NULL - 0
Andreas Rheinhardt
git at videolan.org
Tue Oct 4 19:16:43 EEST 2022
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Tue Sep 27 20:29:41 2022 +0200| [1e1ddbb70dd13c00c2e7378c17b3435325b856cf] | committer: Andreas Rheinhardt
avcodec/zerocodec: Avoid undefined NULL - 0
Fixes the zerocodec FATE-test.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1e1ddbb70dd13c00c2e7378c17b3435325b856cf
---
libavcodec/zerocodec.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavcodec/zerocodec.c b/libavcodec/zerocodec.c
index 93fc2834e4..42fb24ff6c 100644
--- a/libavcodec/zerocodec.c
+++ b/libavcodec/zerocodec.c
@@ -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];
}
More information about the ffmpeg-cvslog
mailing list