[FFmpeg-devel] [PATCH] aacdec: don't return frames without data from aac_decode_er_frame
Rostislav Pehlivanov
atomnuker at gmail.com
Tue Nov 10 03:21:05 CET 2015
Applied, thanks
On Mon, 2015-11-09 at 22:16 +0100, Andreas Cadhalpun wrote:
> This is similar to commit ec38a1b for aac_decode_frame_int.
>
> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
> ---
> libavcodec/aacdec_template.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/libavcodec/aacdec_template.c
> b/libavcodec/aacdec_template.c
> index c279510..70cffe6 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;
More information about the ffmpeg-devel
mailing list