1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-03 05:10:03 +02:00

avcodec/mpeg12dec: use init_get_bits8 and check the return value

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Thierry Foucu 2023-01-04 10:54:24 -08:00 committed by James Almer
parent 99bd2dbc91
commit efbe84eb1b

View File

@ -2550,7 +2550,9 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture,
}
break;
case EXT_START_CODE:
init_get_bits(&s2->gb, buf_ptr, input_size * 8);
ret = init_get_bits8(&s2->gb, buf_ptr, input_size);
if (ret < 0)
return ret;
switch (get_bits(&s2->gb, 4)) {
case 0x1: