[FFmpeg-cvslog] avfilter/af_compand: "use local variable for channels" from libavfilter/ af_compand_fork.c

Michael Niedermayer git at videolan.org
Wed Feb 26 13:07:01 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Feb 26 12:50:54 2014 +0100| [619d6b8f55cede83a4d89bf657a9f5a93858292d] | committer: Michael Niedermayer

avfilter/af_compand: "use local variable for channels" from libavfilter/af_compand_fork.c

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=619d6b8f55cede83a4d89bf657a9f5a93858292d
---

 libavfilter/af_compand.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavfilter/af_compand.c b/libavfilter/af_compand.c
index 6ad4ff3..10f7f09 100644
--- a/libavfilter/af_compand.c
+++ b/libavfilter/af_compand.c
@@ -344,14 +344,14 @@ static int config_output(AVFilterLink *outlink)
         return AVERROR(EINVAL);
     }
 
-    if ((nb_attacks > outlink->channels) || (nb_decays > outlink->channels)) {
+    if ((nb_attacks > channels) || (nb_decays > channels)) {
         av_log(ctx, AV_LOG_ERROR, "Number of attacks/decays bigger than number of channels.\n");
         return AVERROR(EINVAL);
     }
 
     uninit(ctx);
 
-    s->channels = av_mallocz_array(outlink->channels, sizeof(*s->channels));
+    s->channels = av_mallocz_array(channels, sizeof(*s->channels));
     s->nb_segments = (nb_points + 4) * 2;
     s->segments = av_mallocz_array(s->nb_segments, sizeof(*s->segments));
 
@@ -486,7 +486,7 @@ static int config_output(AVFilterLink *outlink)
     s->in_min_lin  = exp(s->segments[1].x);
     s->out_min_lin = exp(s->segments[1].y);
 
-    for (i = 0; i < outlink->channels; i++) {
+    for (i = 0; i < channels; i++) {
         ChanParam *cp = &s->channels[i];
 
         if (cp->attack > 1.0 / sample_rate)



More information about the ffmpeg-cvslog mailing list