avcodec/mjpegbdec: use init_get_bits8()

pull/388/head
Paul B Mahol 2 years ago
parent 6a150fcdb9
commit b9d71cdb9e
  1. 6
      libavcodec/mjpegbdec.c

@ -64,10 +64,8 @@ read_header:
s->restart_count = 0;
s->mjpb_skiptosod = 0;
if (buf_end - buf_ptr >= 1 << 28)
return AVERROR_INVALIDDATA;
init_get_bits(&hgb, buf_ptr, /*buf_size*/(buf_end - buf_ptr)*8);
if ((ret = init_get_bits8(&hgb, buf_ptr, /*buf_size*/(buf_end - buf_ptr))) < 0)
return ret;
skip_bits(&hgb, 32); /* reserved zeros */

Loading…
Cancel
Save