You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avfilter/f_ebur128: properly propagate true peak
After3b26b782ee
, `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. Fixes:3b26b782ee
This commit is contained in:
@ -692,11 +692,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
|
||||
double peak = dsp->find_peak(ebur128->true_peaks_per_frame, nb_channels,
|
||||
swr_samples, ret);
|
||||
|
||||
ebur128->true_peak = DBFS(peak);
|
||||
for (int ch = 0; ch < nb_channels; ch++) {
|
||||
peak = FFMAX(peak, ebur128->true_peaks[ch]);
|
||||
ebur128->true_peaks[ch] = FFMAX(ebur128->true_peaks[ch],
|
||||
ebur128->true_peaks_per_frame[ch]);
|
||||
}
|
||||
|
||||
ebur128->true_peak = DBFS(peak);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user