aboutsummaryrefslogtreecommitdiff
path: root/libavcodec/resample.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/resample.c')
-rw-r--r--libavcodec/resample.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/resample.c b/libavcodec/resample.c
index 77e5f5f47d..d154e8a855 100644
--- a/libavcodec/resample.c
+++ b/libavcodec/resample.c
@@ -124,11 +124,11 @@ static void ac3_5p1_mux(short *output, short *input1, short *input2, int n)
}
}
-ReSampleContext *audio_resample_init(int output_channels, int input_channels,
+ReSampleContext *audio_resample_init(int output_channels, int input_channels,
int output_rate, int input_rate)
{
ReSampleContext *s;
-
+
if ( input_channels > 2)
{
av_log(NULL, AV_LOG_ERROR, "Resampling with input channels greater than 2 unsupported.");
@@ -143,10 +143,10 @@ ReSampleContext *audio_resample_init(int output_channels, int input_channels,
}
s->ratio = (float)output_rate / (float)input_rate;
-
+
s->input_channels = input_channels;
s->output_channels = output_channels;
-
+
s->filter_channels = s->input_channels;
if (s->output_channels < s->filter_channels)
s->filter_channels = s->output_channels;
@@ -160,7 +160,7 @@ ReSampleContext *audio_resample_init(int output_channels, int input_channels,
s->filter_channels = 2;
s->resample_context= av_resample_init(output_rate, input_rate, 16, 10, 0, 1.0);
-
+
return s;
}
@@ -186,7 +186,7 @@ int audio_resample(ReSampleContext *s, short *output, short *input, int nb_sampl
memcpy(bufin[i], s->temp[i], s->temp_len * sizeof(short));
buftmp2[i] = bufin[i] + s->temp_len;
}
-
+
/* make some zoom to avoid round pb */
lenout= (int)(nb_samples * s->ratio) + 16;
bufout[0]= (short*) av_malloc( lenout * sizeof(short) );