mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-14 03:11:20 +00:00
Prevent block size from inreasing in the shorten decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
581898ae88
commit
b399cbfba5
@ -482,9 +482,15 @@ static int shorten_decode_frame(AVCodecContext *avctx,
|
|||||||
case FN_BITSHIFT:
|
case FN_BITSHIFT:
|
||||||
s->bitshift = get_ur_golomb_shorten(&s->gb, BITSHIFTSIZE);
|
s->bitshift = get_ur_golomb_shorten(&s->gb, BITSHIFTSIZE);
|
||||||
break;
|
break;
|
||||||
case FN_BLOCKSIZE:
|
case FN_BLOCKSIZE: {
|
||||||
s->blocksize = get_uint(s, av_log2(s->blocksize));
|
int blocksize = get_uint(s, av_log2(s->blocksize));
|
||||||
|
if (blocksize > s->blocksize) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "Increasing block size is not supported\n");
|
||||||
|
return AVERROR_PATCHWELCOME;
|
||||||
|
}
|
||||||
|
s->blocksize = blocksize;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case FN_QUIT:
|
case FN_QUIT:
|
||||||
*data_size = 0;
|
*data_size = 0;
|
||||||
return buf_size;
|
return buf_size;
|
||||||
|
Loading…
Reference in New Issue
Block a user