summaryrefslogtreecommitdiff
path: root/libavcodec/mpegaudiodec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-05-05 20:05:41 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-05-05 20:05:41 +0000
commit02af2269c03ed4a17b81247eff11b0d5bb1e9085 (patch)
treeaea8b3259a4ed6363da2e4796d149cbccaf745b8 /libavcodec/mpegaudiodec.c
parent369a02c2f4f3011e2afee8b9d2a4e7fddac86fef (diff)
check for error
Originally committed as revision 4183 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegaudiodec.c')
-rw-r--r--libavcodec/mpegaudiodec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 196d77d2a6..106c9fe689 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -2628,7 +2628,10 @@ static int decode_frame(AVCodecContext * avctx,
}
s->inbuf_ptr = s->inbuf;
s->frame_size = 0;
- *data_size = out_size;
+ if(out_size>=0)
+ *data_size = out_size;
+ 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
break;
}
}