summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 c279510ed1..70cffe6a92 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;