mp3dec: propagate error code correctly.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-10-21 01:31:53 +02:00
parent 273fca9ac0
commit 7696a392e2

View File

@ -1616,6 +1616,9 @@ static int mp_decode_frame(MPADecodeContext *s, OUT_INT *samples,
s->last_buf_size += i;
}
if(nb_frames < 0)
return nb_frames;
/* get output buffer */
if (!samples) {
s->frame.nb_samples = s->avctx->frame_size;