mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 19:58:59 +00:00
avcodec/scpr: Skip frames which change nothing
Fixes: Timeout Fixes: 10292/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-5687943864254464 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
a8a98ba9ee
commit
d702769213
@ -516,7 +516,7 @@ static int decompress_p(AVCodecContext *avctx,
|
||||
int backstep = linesize - avctx->width;
|
||||
|
||||
if (bytestream2_get_byte(gb) == 0)
|
||||
return 0;
|
||||
return 1;
|
||||
bytestream2_skip(gb, 1);
|
||||
init_rangecoder(&s->rc, gb);
|
||||
|
||||
@ -813,6 +813,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
|
||||
s->current_frame->linesize[0] / 4,
|
||||
(uint32_t *)s->last_frame->data[0],
|
||||
s->last_frame->linesize[0] / 4);
|
||||
if (ret == 1)
|
||||
return avpkt->size;
|
||||
} else {
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user