aboutsummaryrefslogtreecommitdiffstats
path: root/libswresample
diff options
context:
space:
mode:
authorMuhammad Faiz <mfcc64@gmail.com>2016-12-03 03:05:49 +0700
committerMuhammad Faiz <mfcc64@gmail.com>2016-12-04 01:32:26 +0700
commit01ebb57c03abde89bca7bdbc552917efcb8f551d (patch)
tree148d0b3719225d543c8f0d23a4642bed1ca6a557 /libswresample
parent83a75bf6c31b3c0ce2ca7e1426d1f2e3df634239 (diff)
downloadffmpeg-01ebb57c03abde89bca7bdbc552917efcb8f551d.tar.gz
swresample/resample: do not rebuild filter when sample_delta is zero
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
Diffstat (limited to 'libswresample')
-rw-r--r--libswresample/resample.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libswresample/resample.c b/libswresample/resample.c
index e65a57a877..71dffb9a3e 100644
--- a/libswresample/resample.c
+++ b/libswresample/resample.c
@@ -449,7 +449,7 @@ static int rebuild_filter_bank_with_compensation(ResampleContext *c)
static int set_compensation(ResampleContext *c, int sample_delta, int compensation_distance){
int ret;
- if (compensation_distance) {
+ if (compensation_distance && sample_delta) {
ret = rebuild_filter_bank_with_compensation(c);
if (ret < 0)
return ret;