41                               void *
data, 
int *got_frame,
 
   45     int buf_size = avpkt->
size;
 
   47     const uint8_t *buf_end, *buf_ptr;
 
   49     uint32_t dqt_offs, dht_offs, sof_offs, sos_offs, second_field_offs;
 
   50     uint32_t field_size, sod_offs;
 
   54     buf_end = buf + buf_size;
 
   63     if (buf_end - buf_ptr >= 1 << 28)
 
   79     second_field_offs = 
read_offs(avctx, &hgb, buf_end - buf_ptr, 
"second_field_offs is %d and size is %d\n");
 
   82     dqt_offs = 
read_offs(avctx, &hgb, buf_end - buf_ptr, 
"dqt is %d and size is %d\n");
 
   86         init_get_bits(&s->
gb, buf_ptr+dqt_offs, (buf_end - (buf_ptr+dqt_offs))*8);
 
   93     dht_offs = 
read_offs(avctx, &hgb, buf_end - buf_ptr, 
"dht is %d and size is %d\n");
 
   97         init_get_bits(&s->
gb, buf_ptr+dht_offs, (buf_end - (buf_ptr+dht_offs))*8);
 
  102     sof_offs = 
read_offs(avctx, &hgb, buf_end - buf_ptr, 
"sof is %d and size is %d\n");
 
  106         init_get_bits(&s->
gb, buf_ptr+sof_offs, (buf_end - (buf_ptr+sof_offs))*8);
 
  112     sos_offs = 
read_offs(avctx, &hgb, buf_end - buf_ptr, 
"sos is %d and size is %d\n");
 
  114     sod_offs = 
read_offs(avctx, &hgb, buf_end - buf_ptr, 
"sof is %d and size is %d\n");
 
  119                       8 * 
FFMIN(field_size, buf_end - buf_ptr - sos_offs));
 
  132             buf_ptr = buf + second_field_offs;