DECLARE_ALIGNED_16(DCTELEM, block[64]);
DECLARE_ALIGNED_16(uint8_t, ublock[64]);
int coordmap[64];
+ int bits_count = pkt->size << 3;
if(c->pic.data[0])
avctx->release_buffer(avctx, &c->pic);
return -1;
}
- init_get_bits(&gb, pkt->data, pkt->size*8);
+ init_get_bits(&gb, pkt->data, bits_count);
if (c->version >= 'i')
skip_bits_long(&gb, 32);
}
if (get_bits_count(&gb) & 0x1F) //next plane data starts at 32-bit boundary
skip_bits_long(&gb, 32 - (get_bits_count(&gb) & 0x1F));
+ if (get_bits_count(&gb) >= bits_count)
+ break;
}
emms_c();