From patchwork Tue Jun 28 12:14:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 36506 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b27:b0:88:1bbf:7fd2 with SMTP id l39csp2612788pzh; Tue, 28 Jun 2022 05:15:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v9DW5I44J2GqzoQ9QmFcQsfSfZ6thMu7fQWNE+rWrfimenmVrC49tVJeIp1PEYwa/13r8y X-Received: by 2002:a05:6402:2548:b0:437:62de:668 with SMTP id l8-20020a056402254800b0043762de0668mr22588833edb.143.1656418510529; Tue, 28 Jun 2022 05:15:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656418510; cv=none; d=google.com; s=arc-20160816; b=tIq2FwzCkrNTwXMYRYcWi/1iuYXtnECiWf7H6FCdA3oqZVIl/1zbP2iZw0+HPf8mA/ 64ofuSuvsZGpTBHNRZ072uyYmLzuks6cl0ovGlex3o4u3hofthzVQK+hbPYB9O6jwEGh h/XjacCoNkJyP4uFXg85RC/Rn7WQhzU2vH1/Io9xgn33iXGBfgO0xOi6959J+iRKTR84 P5igwUGXe2iwLAt733067rs7LRPf8IVKKzCHLW9tDn73FNvp3MZ0DsxBwbXF+W8L0InG K3QlN9F3paL2O/14lhZSWDnxJKKEgiI2OFN/I59D0hhGzI5MJyXJuQukszb6wCuuqYRv p7Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to; bh=TqKGLqs/r10Pzt3/0D6Zg+4DszN2qtMHgeR4C3h4v8M=; b=CJm5LmjbJGEcfZQ8krCo8kh7cO2qPtUdjskLFm6FaOFQnrs2GkXViKdTRPLbEPEzFo DcULgSzG1PE52qGAwHQnPP8Lgl5Pmf9rZ8RaEc/ZF/wH1t0tez1MSzdGgMZh9aWh81mY FgTeMhNRF4zzVeON+v6taOAe9Bs06TyQc3hjTNP2G+6nHTNwmz9kGOfYKbwlYIX57U1i 1ar/83GYAQcKYkAhlfdfqOaI9YXeWfDrjY1y6g2vz4f/6/wY1N7klVNxtEVLDmMKG+s9 phpj4qfbIFYyzDp2HH2IT1GHB2iWcvMEPfRd0vMljE9eVsE06y6knoPq7wXpV21syxJk N1Ww== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id v18-20020a509552000000b0042bcd41832fsi16333657eda.400.2022.06.28.05.15.10; Tue, 28 Jun 2022 05:15:10 -0700 (PDT) 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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5056D68B938; Tue, 28 Jun 2022 15:15:08 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-at02-1.mx.upcmail.net (vie01a-dmta-at02-1.mx.upcmail.net [62.179.121.148]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DB77968B938 for ; Tue, 28 Jun 2022 15:15:01 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-at02.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1o6A7R-0005Fy-4k for ffmpeg-devel@ffmpeg.org; Tue, 28 Jun 2022 14:15:01 +0200 Received: from ren-mail-psmtp-mg02. ([80.109.253.241]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id 69o6owUDS8s8U6A7RoJYZO; Tue, 28 Jun 2022 14:15:01 +0200 Received: from localhost ([213.47.68.29]) by ren-mail-psmtp-mg02. with ESMTP id 6A6SoE5tZ8eSW6A6ToiUWb; Tue, 28 Jun 2022 14:14:01 +0200 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.4 cv=KKE5sHJo c=1 sm=1 tr=0 ts=62baf089 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=aDceLb_imFDDGSIYdiYA:9 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 28 Jun 2022 14:14:00 +0200 Message-Id: <20220628121400.20444-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220628121400.20444-1-michael@niedermayer.cc> References: <20220628121400.20444-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfPBXOSgjwpqpyArkF6KhSAudnyK6+C5PFvTfMYbBk4ntnIVXtwTWMJVFR7oZ/kuXY4qqvf52ZKRFJ2lGCQNr6CdK8kOV+N2nAn1jx8/w/IjB4/6sVT+I 3lgQ2GEfpv51HLqXvFi556Dpx1NBtOcthVuIs+SVcezLXoOZ1CNVCnNCxkARYtUpU4JQ3TtfLv7MGw== Subject: [FFmpeg-devel] [PATCH 2/2] fftools/ffmpeg_filter: Fix audio_drift_threshold check X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: /GBsoxgtbq+d Variant 2 Found-by: mkver Signed-off-by: Michael Niedermayer --- fftools/ffmpeg_filter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 0845c631a5..a204c4f65f 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include #include "ffmpeg.h" @@ -891,7 +892,7 @@ static int configure_input_audio_filter(FilterGraph *fg, InputFilter *ifilter, char args[256] = {0}; av_strlcatf(args, sizeof(args), "async=%d", audio_sync_method); - if (audio_drift_threshold != 0.1) + if (fabs(audio_drift_threshold - 0.1) > FLT_EPSILON) av_strlcatf(args, sizeof(args), ":min_hard_comp=%f", audio_drift_threshold); if (!fg->reconfiguration) av_strlcatf(args, sizeof(args), ":first_pts=0");