avcodec/mjpegbdec: use init_get_bits8()

This commit is contained in:
Paul B Mahol 2022-09-21 14:59:53 +02:00
parent 6a150fcdb9
commit b9d71cdb9e
1 changed files with 2 additions and 4 deletions

View File

@ -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 */