mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/mjpegbdec: use init_get_bits8()
This commit is contained in:
parent
6a150fcdb9
commit
b9d71cdb9e
|
@ -64,10 +64,8 @@ read_header:
|
||||||
s->restart_count = 0;
|
s->restart_count = 0;
|
||||||
s->mjpb_skiptosod = 0;
|
s->mjpb_skiptosod = 0;
|
||||||
|
|
||||||
if (buf_end - buf_ptr >= 1 << 28)
|
if ((ret = init_get_bits8(&hgb, buf_ptr, /*buf_size*/(buf_end - buf_ptr))) < 0)
|
||||||
return AVERROR_INVALIDDATA;
|
return ret;
|
||||||
|
|
||||||
init_get_bits(&hgb, buf_ptr, /*buf_size*/(buf_end - buf_ptr)*8);
|
|
||||||
|
|
||||||
skip_bits(&hgb, 32); /* reserved zeros */
|
skip_bits(&hgb, 32); /* reserved zeros */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue