diff mbox

[FFmpeg-devel] swresample/resample: do not rebuild filter when sample_delta is zero

Message ID 1480709454-30030-1-git-send-email-mfcc64@gmail.com
State Accepted
Commit 01ebb57c03abde89bca7bdbc552917efcb8f551d
Headers show

Commit Message

Muhammad Faiz Dec. 2, 2016, 8:10 p.m. UTC
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
---
 libswresample/resample.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer Dec. 3, 2016, 3:48 p.m. UTC | #1
On Sat, Dec 03, 2016 at 03:10:54AM +0700, Muhammad Faiz wrote:
> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
> ---
>  libswresample/resample.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

probably ok

[...]
Muhammad Faiz Dec. 3, 2016, 6:36 p.m. UTC | #2
On 12/3/16, Michael Niedermayer <michael@niedermayer.cc> wrote:
> On Sat, Dec 03, 2016 at 03:10:54AM +0700, Muhammad Faiz wrote:
>> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
>> ---
>>  libswresample/resample.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> probably ok

Applied

Thank's
diff mbox

Patch

diff --git a/libswresample/resample.c b/libswresample/resample.c
index e65a57a..71dffb9 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;