[FFmpeg-cvslog] aacdec: don't return frames without data from aac_decode_er_frame

Andreas Cadhalpun git at videolan.org
Thu Nov 26 01:44:26 CET 2015


ffmpeg | branch: release/2.7 | Andreas Cadhalpun <andreas.cadhalpun at googlemail.com> | Mon Nov  9 22:16:01 2015 +0100| [9e3848328daecf069be8a618d5f2c1ef54557567] | committer: Andreas Cadhalpun

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 at googlemail.com>
Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit d7f29bfa6985e3eea2033dba0449e47b41b85928)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9e3848328daecf069be8a618d5f2c1ef54557567
---

 libavcodec/aacdec.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index b8779c0..9fe1133 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -2940,6 +2940,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;



More information about the ffmpeg-cvslog mailing list