lavfi/ebur128: apply I dual mono correction only if I available
authorClément Bœsch <u@pkh.me>
Sun, 13 Dec 2015 17:20:42 +0000 (18:20 +0100)
committerClément Bœsch <u@pkh.me>
Sun, 13 Dec 2015 17:21:02 +0000 (18:21 +0100)
Spotted-by: jamrial & gcc 6
libavfilter/f_ebur128.c

index 9e115fc..b9577c5 100644 (file)
@@ -663,12 +663,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
                     nb_integrated  += nb_v;
                     integrated_sum += nb_v * ebur128->i400.histogram[i].energy;
                 }
-                if (nb_integrated)
+                if (nb_integrated) {
                     ebur128->integrated_loudness = LOUDNESS(integrated_sum / nb_integrated);
                     /* dual-mono correction */
                     if (nb_channels == 1 && ebur128->dual_mono) {
                         ebur128->integrated_loudness -= ebur128->pan_law;
                     }
+                }
             }
 
             /* LRA */