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:
parent
99bd2dbc91
commit
efbe84eb1b
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user