aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2015-12-13 18:20:42 +0100
committerClément Bœsch <u@pkh.me>2015-12-13 18:21:02 +0100
commit5083900b73d12ad2c7aa2e2532f244716dec533f (patch)
tree86e246addb174ee1217cff82452c42b46e94c998
parentf69f050a316810dca1f3bce79d5c7ccaa2ea51c0 (diff)
downloadffmpeg-5083900b73d12ad2c7aa2e2532f244716dec533f.tar.gz
lavfi/ebur128: apply I dual mono correction only if I available
Spotted-by: jamrial & gcc 6
-rw-r--r--libavfilter/f_ebur128.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/f_ebur128.c b/libavfilter/f_ebur128.c
index 9e115fcf17..b9577c5bd1 100644
--- a/libavfilter/f_ebur128.c
+++ b/libavfilter/f_ebur128.c
@@ -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 */