After 3b26b782ee, `ebur128->true_peak` was only set to the maximum of the current "true peak per frame" values, when it should report the true peak for the entire stream.
Unified · Split
| @@ -692,11 +692,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) · 691 unmodified lines | |||
| 692 | double peak = dsp->find_peak(ebur128->true_peaks_per_frame, nb_channels, | 692 | double peak = dsp->find_peak(ebur128->true_peaks_per_frame, nb_channels, |
| 693 | swr_samples, ret); | 693 | swr_samples, ret); |
| 694 | 694 | ||
| 695 | ebur128->true_peak = DBFS(peak); | ||
| 696 | for (int ch = 0; ch < nb_channels; ch++) { | 695 | for (int ch = 0; ch < nb_channels; ch++) { |
| 696 | peak = FFMAX(peak, ebur128->true_peaks[ch]); | ||
| 697 | ebur128->true_peaks[ch] = FFMAX(ebur128->true_peaks[ch], | 697 | ebur128->true_peaks[ch] = FFMAX(ebur128->true_peaks[ch], |
| 698 | ebur128->true_peaks_per_frame[ch]); | 698 | ebur128->true_peaks_per_frame[ch]); |
| 699 | } | 699 | } |
| 700 | |||
| 701 | ebur128->true_peak = DBFS(peak); | ||
| 700 | } | 702 | } |
| 701 | #endif | 703 | #endif |
| 702 | 704 | ||