Kaynağa Gözat

avfilter/f_ebur128: Fix incorrect ebur128 peak calculation.

Since 3b26b782eeded9b9ab7fac013cd1a83a30d68206 it would only look at the
first channel.

Signed-off-by: Carl Hetherington <cth@carlh.net>
Reviewed-by: Niklas Haas <ffmpeg@haasn.xyz>
Carl Hetherington via ffmpeg-devel 2 hafta önce
ebeveyn
işleme
1eb2cbd865
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      libavfilter/f_ebur128.c

+ 1 - 1
libavfilter/f_ebur128.c

@@ -657,7 +657,7 @@ double ff_ebur128_find_peak_c(double *restrict ch_peaks, const int nb_channels,
     for (int ch = 0; ch < nb_channels; ch++) {
         double ch_peak = ch_peaks[ch];
         for (int i = 0; i < nb_samples; i++) {
-            const double sample = fabs(samples[i * nb_channels]);
+            const double sample = fabs(samples[i * nb_channels + ch]);
             ch_peak = FFMAX(ch_peak, sample);
         }
         maxpeak = FFMAX(maxpeak, ch_peak);