From patchwork Fri Dec 2 20:10:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Faiz X-Patchwork-Id: 1661 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.65.86 with SMTP id o83csp476976vsa; Fri, 2 Dec 2016 12:12:23 -0800 (PST) X-Received: by 10.28.145.66 with SMTP id t63mr4235263wmd.99.1480709543391; Fri, 02 Dec 2016 12:12:23 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id hd4si6568671wjb.149.2016.12.02.12.12.22; Fri, 02 Dec 2016 12:12:23 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9E07D689F30; Fri, 2 Dec 2016 22:12:11 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 150DC689EAB for ; Fri, 2 Dec 2016 22:12:05 +0200 (EET) Received: by mail-pg0-f66.google.com with SMTP id p66so8788224pga.2 for ; Fri, 02 Dec 2016 12:12:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=fvh3VGGlgLhKqKmQzjEayXKmDE2fM1I+kkHP0k14998=; b=xHr6CW+z6STNconwxh6FAIDKf6488d2SO3X2O/KAQmPe7ZXzH+1gTxL6pB6uXtRpev 4FDrGwBeJzE1FY8FQxL2jWKGAoNV27rTdxuJ24uDCNDnZm+iYE7F0I5HPC15t/ogGHtZ AAUNUfzEuCivDU3FdMNQKZiNY/iu8EVrE8XftKacrbbt+xlG0J0NYxmLGRf+1l12PO+f I3j3/V+zP/O+nDgzpl4+tZ8JalD/IdZdzLm2PBqnTtPSltYQlq9y5g9VKI5P88hcRCcA bEOfWmRw6leDcM38n7r49nx2oiGQPJfjamEgC86QM3mLnk157Hw8WUu9HEj0ZXgBd4Do IG3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=fvh3VGGlgLhKqKmQzjEayXKmDE2fM1I+kkHP0k14998=; b=V4DN9MktQw8Wuy4M53mIR+eVJoDkoL94atimwAn3LfsGH52QNj+6Ng6E/2KhXrG3i2 mB1HXMz1pNtJNsYrsiedoZPh5Bf7asleT2poI/Wu76qj9R11FVTg2wVw2f+vcgsyKXu3 EFD/cCUHmKo6PnveU2fYay4hsF5ntjphouY72+KsbXTiNa5c31EGxA7e6h0VKktIn3k+ bwTEMAjzJA/5S2Hd38OfPSubNm48OMqTmDW0mog0obqT5TqUMNe93bm1v8nM5D0fvbrK E7y9jRhUVW7KbI6/XMnzkhJ86WTYL5ob51c2f1tSEa03Ms2GxhTfTvDA0i4ReDLwoiRd WT0A== X-Gm-Message-State: AKaTC01nW8p0PE13AejU9X26uylUWsQ8mxMJ36ke+i18WieHgK+gsE167tJZLPBpca4QDg== X-Received: by 10.84.129.99 with SMTP id 90mr101525163plb.154.1480709531795; Fri, 02 Dec 2016 12:12:11 -0800 (PST) Received: from localhost.localdomain.localdomain ([114.121.237.4]) by smtp.gmail.com with ESMTPSA id l3sm9591368pgc.41.2016.12.02.12.12.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Dec 2016 12:12:11 -0800 (PST) From: Muhammad Faiz To: ffmpeg-devel@ffmpeg.org Date: Sat, 3 Dec 2016 03:10:54 +0700 Message-Id: <1480709454-30030-1-git-send-email-mfcc64@gmail.com> X-Mailer: git-send-email 2.5.0 Subject: [FFmpeg-devel] [PATCH] swresample/resample: do not rebuild filter when sample_delta is zero X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Muhammad Faiz MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Muhammad Faiz --- libswresample/resample.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;