for(i=1;i<16;i++) {
const HuffTable *h = &mpa_huff_tables[i];
int xsize, x, y;
- unsigned int n;
uint8_t tmp_bits [512];
uint16_t tmp_codes[512];
memset(tmp_codes, 0, sizeof(tmp_codes));
xsize = h->xsize;
- n = xsize * xsize;
j = 0;
for(x=0;x<xsize;x++) {
MPADecodeContext *s = avctx->priv_data;
uint32_t header;
int out_size;
+ int skipped = 0;
OUT_INT *out_samples = data;
retry:
header = AV_RB32(buf);
if(ff_mpa_check_header(header) < 0){
buf++;
-// buf_size--;
+ buf_size--;
+ skipped++;
av_log(avctx, AV_LOG_ERROR, "Header missing skipping one byte.\n");
goto retry;
}
}else
av_log(avctx, AV_LOG_DEBUG, "Error while decoding MPEG audio frame.\n"); //FIXME return -1 / but also return the number of bytes consumed
s->frame_size = 0;
- return buf_size;
+ return buf_size + skipped;
}
static void flush(AVCodecContext *avctx){