From 41049d07f2e8f304895a12b6e27400fbc72cc797 Mon Sep 17 00:00:00 2001 From: Rob Sykes Date: Tue, 11 Dec 2012 21:23:24 +0100 Subject: [PATCH] swr: add a lowpass default so that each Resampler can have its own default. Signed-off-by: Michael Niedermayer --- libswresample/resample.c | 3 ++- libswresample/swresample.c | 2 +- 2 files changed, 3 insertions(+), 2 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<