diff options
author | Paul B Mahol <onemda@gmail.com> | 2017-06-29 16:42:14 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2017-06-29 16:43:40 +0200 |
commit | 3821c004e2607fb4450f1635ebaf6a4b7d5aeef9 (patch) | |
tree | 3b37b3aa73a9e37f5fb30c83bedb9a0b9123208e /libavcodec/interplayvideo.c | |
parent | 4d681269e0966446b21a324c15c5e5e6cef7c378 (diff) | |
download | ffmpeg-3821c004e2607fb4450f1635ebaf6a4b7d5aeef9.tar.gz |
avcodec/interplayvideo: fix regression causing artifacts
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/interplayvideo.c')
-rw-r--r-- | libavcodec/interplayvideo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c index 690bc76901..56ce38b042 100644 --- a/libavcodec/interplayvideo.c +++ b/libavcodec/interplayvideo.c @@ -1044,12 +1044,14 @@ static void ipvideo_decode_format_10_opcodes(IpvideoContext *s, AVFrame *frame) for (x = 0; x < s->avctx->width; x += 8) { s->pixel_ptr = s->cur_decode_frame->data[0] + x + y * s->cur_decode_frame->linesize[0]; - while (skip <= 0 && bytestream2_get_bytes_left(&skip_map_ptr) > 1) { + while (skip <= 0) { if (skip != -0x8000 && skip) { opcode = bytestream2_get_le16(&decoding_map_ptr); ipvideo_format_10_passes[pass](s, frame, opcode); break; } + if (bytestream2_get_bytes_left(&skip_map_ptr) < 2) + return; skip = bytestream2_get_le16(&skip_map_ptr); } skip *= 2; |