summaryrefslogtreecommitdiff
path: root/libavcodec/mpegaudiodec.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2012-04-05 16:48:33 +0200
committerDiego Biurrun <diego@biurrun.de>2012-04-18 18:28:24 +0200
commitaa3f2cb58462aed387625189e3dabf91b9fbd3e6 (patch)
tree0d8412ce5c855b111df92a1e8f1e0ed6953784f6 /libavcodec/mpegaudiodec.c
parent3c58300269768e2dcd5cd8b55d56ecab99cb32f1 (diff)
downloadffmpeg-aa3f2cb58462aed387625189e3dabf91b9fbd3e6.tar.gz
mpegaudiodec: Do not discard mp_decode_frame() return value.
This fixes the warning: libavcodec/mpegaudiodec.c:1704:14: warning: variable ‘out_size’ set but not used
Diffstat (limited to 'libavcodec/mpegaudiodec.c')
-rw-r--r--libavcodec/mpegaudiodec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 0ab87e1a96..f72e65cb0e 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -1733,6 +1733,10 @@ static int decode_frame_adu(AVCodecContext *avctx, void *data,
s->frame_size = len;
out_size = mp_decode_frame(s, NULL, buf, buf_size);
+ if (out_size < 0) {
+ av_log(avctx, AV_LOG_ERROR, "Error while decoding MPEG audio frame.\n");
+ return AVERROR_INVALIDDATA;
+ }
*got_frame_ptr = 1;
*(AVFrame *)data = s->frame;