summaryrefslogtreecommitdiffstats
path: root/libavcodec/aacdec_template.c
diff options
context:
space:
mode:
authorAndreas Cadhalpun <andreas.cadhalpun@googlemail.com>2015-11-09 22:16:01 +0100
committerRostislav Pehlivanov <atomnuker@gmail.com>2015-11-10 02:12:38 +0000
commitd7f29bfa6985e3eea2033dba0449e47b41b85928 (patch)
tree7d82e8dc407f4d9c534430ea8962b738a73fb33a /libavcodec/aacdec_template.c
parentef7fe9851e0913a2e8d27d55bcb84847a6efa7ca (diff)
downloadffmpeg-streaming-d7f29bfa6985e3eea2033dba0449e47b41b85928.zip
ffmpeg-streaming-d7f29bfa6985e3eea2033dba0449e47b41b85928.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>
Diffstat (limited to 'libavcodec/aacdec_template.c')
-rw-r--r--libavcodec/aacdec_template.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c
index c279510..70cffe6 100644
--- a/libavcodec/aacdec_template.c
+++ b/libavcodec/aacdec_template.c
@@ -2901,6 +2901,11 @@ static int aac_decode_er_frame(AVCodecContext *avctx, void *data,
spectral_to_sample(ac, samples);
+ 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;
OpenPOWER on IntegriCloud