Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2015-07-17 14:23:45 +0300
committerPaul B Mahol <onemda@gmail.com>2015-07-17 14:29:29 +0300
commit297df52f303529fd3c326bc8f398a5b3cbf71c0b (patch)
tree771543456b09743687706da1a4e860382c11b184 /libavfilter/af_compand.c
parent21436b95dc96e9cb2ae3f583f219349976ec1b7e (diff)
avfilter/af_compand: fix clipping with default options
Decays and attacks where by default set only for first channel which caused poor defaults to be used which produced clipping on any higher channel. Reported-by: lachs0r Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/af_compand.c')
-rw-r--r--libavfilter/af_compand.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavfilter/af_compand.c b/libavfilter/af_compand.c
index 55ad98a15d..610787f54e 100644
--- a/libavfilter/af_compand.c
+++ b/libavfilter/af_compand.c
@@ -398,6 +398,11 @@ static int config_output(AVFilterLink *outlink)
return AVERROR(EINVAL);
}
+ for (i = nb_decays; i < channels; i++) {
+ s->channels[i].attack = s->channels[nb_decays - 1].attack;
+ s->channels[i].decay = s->channels[nb_decays - 1].decay;
+ }
+
#define S(x) s->segments[2 * ((x) + 1)]
p = s->points;
for (i = 0, new_nb_items = 0; i < nb_points; i++) {