diff options
author | Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> | 2015-11-09 22:16:01 +0100 |
---|---|---|
committer | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2015-11-26 01:37:33 +0100 |
commit | 4dc7e2dd82891679b71a4d71b2df8cdf944ba056 (patch) | |
tree | 856d16a3b3d241ed63c8ff0041028f1ea9b7209a | |
parent | b91980edcf192338980b62971e7a8d9f1cf448c6 (diff) | |
download | ffmpeg-4dc7e2dd82891679b71a4d71b2df8cdf944ba056.tar.gz |
aacdec: don't return frames without data from aac_decode_er_frame
This is similar to commit ec38a1b for aac_decode_frame_int.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d7f29bfa6985e3eea2033dba0449e47b41b85928)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
-rw-r--r-- | libavcodec/aacdec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index 2fb26ba198..da97f288c1 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -2919,6 +2919,11 @@ static int aac_decode_er_frame(AVCodecContext *avctx, void *data, spectral_to_sample(ac); + if (!ac->frame->data[0] && samples) { + av_log(avctx, AV_LOG_ERROR, "no frame data found\n"); + return AVERROR_INVALIDDATA; + } + ac->frame->nb_samples = samples; ac->frame->sample_rate = avctx->sample_rate; *got_frame_ptr = 1; |