diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-18 22:08:28 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-18 22:08:28 +0200 |
commit | e366e6bfab5c13970be2855d1031cb32aafa649e (patch) | |
tree | 653d562af5604539fcca7a3b34d09188c1759e0b /libavcodec/mpegaudiodec.c | |
parent | a02f8ef1d2f4cd267224c9bc3b5e841d7fc943cc (diff) | |
parent | 0f53601ac6b88196e2cae07a4c3aad6810413261 (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
ppc: drop unused function dct_quantize_altivec()
mpegaudiodec: Do not discard mp_decode_frame() return value.
matroska: do not set invalid default duration if frame rate is zero
mkv: use av_reduce instead of av_d2q for framerate estimation
mkv: report average framerate as minimal as well
avcodec_string: Favor AVCodecContext.codec over the default codec.
cook: Make constants passed to AV_BE2NE32C() unsigned to avoid signed overflow.
Conflicts:
libavcodec/cook.c
libavcodec/ppc/mpegvideo_altivec.c
libavcodec/utils.c
libavformat/matroskadec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegaudiodec.c')
-rw-r--r-- | libavcodec/mpegaudiodec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index d7d359a740..97246ac8b0 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; |