comparison mpegaudiodec.c @ 5076:796c2a5481ad libavcodec

make decoder decode the first frame properly if theres more than just one frame input
author michael
date Sun, 27 May 2007 22:34:49 +0000
parents d981eb275c8f
children bff60ecc02f9
comparison
equal deleted inserted replaced
5075:33d50e0e1823 5076:796c2a5481ad
2415 if(s->frame_size<=0 || s->frame_size > buf_size){ 2415 if(s->frame_size<=0 || s->frame_size > buf_size){
2416 av_log(avctx, AV_LOG_ERROR, "incomplete frame\n"); 2416 av_log(avctx, AV_LOG_ERROR, "incomplete frame\n");
2417 return -1; 2417 return -1;
2418 }else if(s->frame_size < buf_size){ 2418 }else if(s->frame_size < buf_size){
2419 av_log(avctx, AV_LOG_ERROR, "incorrect frame size\n"); 2419 av_log(avctx, AV_LOG_ERROR, "incorrect frame size\n");
2420 buf_size= s->frame_size;
2420 } 2421 }
2421 2422
2422 out_size = mp_decode_frame(s, out_samples, buf, buf_size); 2423 out_size = mp_decode_frame(s, out_samples, buf, buf_size);
2423 if(out_size>=0){ 2424 if(out_size>=0){
2424 *data_size = out_size; 2425 *data_size = out_size;