Browse Source

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>
tags/n3.0
Andreas Cadhalpun Rostislav Pehlivanov 9 years ago
parent
commit
d7f29bfa69
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavcodec/aacdec_template.c

+ 5
- 0
libavcodec/aacdec_template.c View File

@@ -2901,6 +2901,11 @@ static int aac_decode_er_frame(AVCodecContext *avctx, void *data,


spectral_to_sample(ac, samples); 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->nb_samples = samples;
ac->frame->sample_rate = avctx->sample_rate; ac->frame->sample_rate = avctx->sample_rate;
*got_frame_ptr = 1; *got_frame_ptr = 1;


Loading…
Cancel
Save