MPADecodeContext *s = avctx->priv_data;
uint32_t header;
int out_size;
- int skipped = 0;
OUT_INT *out_samples = data;
-retry:
if(buf_size < HEADER_SIZE)
return -1;
header = AV_RB32(buf);
if(ff_mpa_check_header(header) < 0){
- buf++;
- buf_size--;
- skipped++;
- av_log(avctx, AV_LOG_ERROR, "Header missing skipping one byte.\n");
- goto retry;
+ av_log(avctx, AV_LOG_ERROR, "Header missing\n");
+ return -1;
}
if (ff_mpegaudio_decode_header((MPADecodeHeader *)s, header) == 1) {
}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 + skipped;
+ return buf_size;
}
static void flush(AVCodecContext *avctx){