Commit c520b986 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/aacenc: Do not divide by lambda_count if it is 0

Avoids Floating point division by 0

Fixes: Ticket8011
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 4b89cf7a
......@@ -898,7 +898,7 @@ static av_cold int aac_encode_end(AVCodecContext *avctx)
{
AACEncContext *s = avctx->priv_data;
av_log(avctx, AV_LOG_INFO, "Qavg: %.3f\n", s->lambda_sum / s->lambda_count);
av_log(avctx, AV_LOG_INFO, "Qavg: %.3f\n", s->lambda_count ? s->lambda_sum / s->lambda_count : NAN);
ff_mdct_end(&s->mdct1024);
ff_mdct_end(&s->mdct128);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment