summaryrefslogtreecommitdiffstats
path: root/libswresample/resample.c
diff options
context:
space:
mode:
authorRob Sykes <[email protected]>2012-12-11 21:23:24 +0100
committerMichael Niedermayer <[email protected]>2012-12-11 22:04:00 +0100
commit41049d07f2e8f304895a12b6e27400fbc72cc797 (patch)
tree3d9642e3642a2337bcf56b2221922f9c32f0d18a /libswresample/resample.c
parentae5a55e77a209ebbac6201ffd790dc7841634266 (diff)
swr: add a lowpass default so that each Resampler can have its own default.
Signed-off-by: Michael Niedermayer <[email protected]>
Diffstat (limited to 'libswresample/resample.c')
-rw-r--r--libswresample/resample.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libswresample/resample.c b/libswresample/resample.c
index 9599421cc3..7256fcf41a 100644
--- a/libswresample/resample.c
+++ b/libswresample/resample.c
@@ -196,7 +196,8 @@ static int build_filter(ResampleContext *c, void *filter, double factor, int tap
}
static ResampleContext *resample_init(ResampleContext *c, int out_rate, int in_rate, int filter_size, int phase_shift, int linear,
- double cutoff, enum AVSampleFormat format, enum SwrFilterType filter_type, int kaiser_beta){
+ double cutoff0, enum AVSampleFormat format, enum SwrFilterType filter_type, int kaiser_beta){
+ double cutoff = cutoff0? cutoff0 : 0.8;
double factor= FFMIN(out_rate * cutoff / in_rate, 1.0);
int phase_count= 1<<phase_shift;