summaryrefslogtreecommitdiff
path: root/libavfilter/af_compand.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2014-02-26 15:03:09 +0000
committerPaul B Mahol <onemda@gmail.com>2014-02-26 15:03:09 +0000
commita2e4b4e968362dff31b29eabda362ee3edb6d00a (patch)
tree1085b3fbfd98486b1086d9231a3997fa7bb617d2 /libavfilter/af_compand.c
parent8f946ac8ea108b8865cc5bd16af3ab063f8003ba (diff)
downloadffmpeg-a2e4b4e968362dff31b29eabda362ee3edb6d00a.tar.gz
avfilter/af_compand: some more cosmetics to decrease difference with qatar
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/af_compand.c')
-rw-r--r--libavfilter/af_compand.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavfilter/af_compand.c b/libavfilter/af_compand.c
index c1d2559354..c50e9893c6 100644
--- a/libavfilter/af_compand.c
+++ b/libavfilter/af_compand.c
@@ -173,7 +173,7 @@ static int compand_nodelay(AVFilterContext *ctx, AVFrame *frame)
{
CompandContext *s = ctx->priv;
AVFilterLink *inlink = ctx->inputs[0];
- const int channels = inlink->channels;
+ const int channels = inlink->channels;
const int nb_samples = frame->nb_samples;
AVFrame *out_frame;
int chan, i;
@@ -233,8 +233,8 @@ static int compand_delay(AVFilterContext *ctx, AVFrame *frame)
for (chan = 0; chan < channels; chan++) {
AVFrame *delay_frame = s->delay_frame;
- const double *src = (double *)frame->extended_data[chan];
- double *dbuf = (double *)delay_frame->extended_data[chan];
+ const double *src = (double *)frame->extended_data[chan];
+ double *dbuf = (double *)delay_frame->extended_data[chan];
ChanParam *cp = &s->channels[chan];
double *dst;
@@ -286,9 +286,9 @@ static int compand_drain(AVFilterLink *outlink)
{
AVFilterContext *ctx = outlink->src;
CompandContext *s = ctx->priv;
- const int channels = outlink->channels;
+ const int channels = outlink->channels;
+ AVFrame *frame = NULL;
int chan, i, dindex;
- AVFrame *frame = NULL;
/* 2048 is to limit output frame size during drain */
frame = ff_get_audio_buffer(outlink, FFMIN(2048, s->delay_count));
@@ -307,7 +307,7 @@ static int compand_drain(AVFilterLink *outlink)
dindex = s->delay_index;
for (i = 0; i < frame->nb_samples; i++) {
dst[i] = av_clipd(dbuf[dindex] * get_volume(s, cp->volume),
- -1, 1);
+ -1, 1);
dindex = MOD(dindex + 1, s->delay_samples);
}
}