mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-22 15:23:11 +00:00
avfilter/af_astats: fix reporting of noise_floor for small number of samples
This commit is contained in:
parent
90afcc2bfd
commit
a5b334e18e
@ -409,9 +409,9 @@ static inline void update_stat(AudioStatsContext *s, ChannelStats *p, double d,
|
||||
}
|
||||
p->nb_samples++;
|
||||
|
||||
noise_floor = calc_noise_floor(p->sorted_samples, nd, drop,
|
||||
s->tc_samples, &p->sorted_front, &p->sorted_back);
|
||||
if (p->nb_samples >= s->tc_samples) {
|
||||
noise_floor = calc_noise_floor(p->sorted_samples, nd, drop,
|
||||
s->tc_samples, &p->sorted_front, &p->sorted_back);
|
||||
if (isnan(p->noise_floor)) {
|
||||
p->noise_floor = noise_floor;
|
||||
p->noise_floor_count = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user