summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Cadhalpun <[email protected]>2015-11-09 22:16:01 +0100
committerMichael Niedermayer <[email protected]>2015-11-12 00:42:50 +0100
commitce2664f5f727b9d86fcf49a72b6a30d1ec2856e5 (patch)
tree16027db1ef537c35fa4eb13ea866b2702c0b29e3
parent8364d607ac0c44be5cdbcdee0870cf504944fe44 (diff)
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 <[email protected]> Reviewed-by: Michael Niedermayer <[email protected]> (cherry picked from commit d7f29bfa6985e3eea2033dba0449e47b41b85928) Signed-off-by: Michael Niedermayer <[email protected]>
-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 c2d7d05650..fb1ce2cb06 100644
--- a/libavcodec/aacdec_template.c
+++ b/libavcodec/aacdec_template.c
@@ -2889,6 +2889,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;