You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avfilter/af_astats: fix reporting of noise_floor for small number of samples
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user