1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-19 05:49:09 +02:00

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: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Andreas Cadhalpun 2015-11-09 22:16:01 +01:00 committed by Michael Niedermayer
parent 8364d607ac
commit ce2664f5f7

View File

@ -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;