diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-05-29 17:49:22 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-06-02 17:30:24 +0200 |
commit | c520b986915a3fdf3a20f6ce0ad5833eccfb7a91 (patch) | |
tree | defffe5fd505ce5b2a0b7517e3e4e1958bf6ecdd /libavcodec/aacenc.c | |
parent | 4b89cf7aa49191c7f8a5ae6e9cf6cfc79ff4ee5e (diff) | |
download | ffmpeg-c520b986915a3fdf3a20f6ce0ad5833eccfb7a91.tar.gz |
avcodec/aacenc: Do not divide by lambda_count if it is 0
Avoids Floating point division by 0
Fixes: Ticket8011
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/aacenc.c')
-rw-r--r-- | libavcodec/aacenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index 29e76ead92..605b804b27 100644 --- a/libavcodec/aacenc.c +++ b/libavcodec/aacenc.c @@ -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); |