[FFmpeg-trac] #8003(undetermined:new): Division by zero at libavcodec/aaccoder.c
FFmpeg
trac at avcodec.org
Sun Jul 7 15:46:11 EEST 2019
#8003: Division by zero at libavcodec/aaccoder.c
-------------------------------------+-------------------------------------
Reporter: Suhwan | Type: defect
Status: new | Priority: normal
Component: | Version: git-
undetermined | master
Keywords: ubsan | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
There's a division by zero at libavcodec/aaccoder.c:554 and 556.
How to reproduce:
{{{
% ffmpeg_g -y -r 14 -i tmp.wmv -map 0 -c:v:14 mpeg1video -c:v zmbv
-disposition:s:19 v210 -disposition:s flv -aframes 10 -ab 45 -ac 9 -b:v
292k -strict 1 tmp_.mov
ffmpeg version N-94185-gca576833e4 Copyright (c) 2000-2019 the FFmpeg
developers
built with clang version 9.0.0
}}}
s->lambda is zero.
{{{
543 static void search_for_pns(AACEncContext *s, AVCodecContext *avctx,
SingleChannelElement *sce
544 {
545 FFPsyBand *band;
546 int w, g, w2, i;
547 int wlen = 1024 / sce->ics.num_windows;
548 int bandwidth, cutoff;
549 float *PNS = &s->scoefs[0*128], *PNS34 = &s->scoefs[1*128];
550 float *NOR34 = &s->scoefs[3*128];
551 uint8_t nextband[128];
552 const float lambda = s->lambda;
553 const float freq_mult = avctx->sample_rate*0.5f/wlen;
554 const float thr_mult = NOISE_LAMBDA_REPLACE*(100.0f/lambda);
555 const float spread_threshold = FFMIN(0.75f,
NOISE_SPREAD_THRESHOLD*FFMAX(0.5f, lambda/100
556 const float dist_bias = av_clipf(4.f * 120 / lambda, 0.25f, 4.0f);
557 const float pns_transient_energy_r = FFMIN(0.7f, lambda / 140.f);
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8003>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list