From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 11F6A48721 for ; Fri, 15 Dec 2023 18:16:53 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D230968D085; Fri, 15 Dec 2023 20:16:50 +0200 (EET) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4A48B68CFCC for ; Fri, 15 Dec 2023 20:16:44 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 68F00E0004 for ; Fri, 15 Dec 2023 18:16:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1702664203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=y3xCec5wyCmQo+Hu4Y7aHdZMggw3c9WVzHt3IjFRZls=; b=NkrZuengG4kF/rIQcahvjjsGcz17ALPv2ICN1EQ8DTLTSB0iJe1oQ5t4DrD1uNwu9OoXQj WmHZTlUdBkuH488/sdbKdN/NmPzia+1poaeEn7SIkqrjpIjOb3LGfJGS+P3W0m/ItgztKG r5MuU6Djm3AClLhxpf9CKR5yXOhFvENQbUxVaPRtp6voJxADbo9N+qi7bJfVWPsnScY94K zjObyGaDns/2SDIbV4MY2CU/7ZBJhlUZcIAI6GJYTccElF2+bsgw3tmxaz5LYqrk+4wOje jHANVRYBdfhTc7NhJ4suV9JLAOAZ7AMWBCDLVGnTdO/gk8U4djQ3ejoOGYJMpw== Date: Fri, 15 Dec 2023 19:16:42 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20231215181642.GS6420@pb2> References: <20231215070046.771-1-ffmpeg@gyani.pro> MIME-Version: 1.0 In-Reply-To: <20231215070046.771-1-ffmpeg@gyani.pro> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH v2] swr/swresample: avoid reapplication of firstpts 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 Content-Type: multipart/mixed; boundary="===============7704598864140395311==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7704598864140395311== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="b2ktwntdbf0dPnbx" Content-Disposition: inline --b2ktwntdbf0dPnbx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 15, 2023 at 12:30:46PM +0530, Gyan Doshi wrote: > During a resampling operation where >=20 > 1) user has specified first_pts > 2) SWR_FLAG_RESAMPLE is not set initially (directly or otherwise) > 3) first_pts has been fulfilled (always using hard compensation) >=20 > then upon first encountering a delay where a soft compensation is > required, swr_set_compensation will lead to another init of swr which > will reset outpts to the specified firstpts thus leading to an output > frame having its pts =3D firstpts. When the next input frame is received, > swr will see a large delay and inject silence from firstpts to the > current frame's pts. This can lead to severe desync and in worst case, > loss of audio playback. >=20 > Parameter firstpts initialized to AV_NOPTS_VALUE in swr_alloc and then > checked in swr_init to avoid resetting outpts, thus avoiding reapplication > of firstpts. >=20 > Fixes #4131. > --- > libswresample/options.c | 1 + > libswresample/swresample.c | 5 +++-- > 2 files changed, 4 insertions(+), 2 deletions(-) LGTM also can a fate test be added for this ? thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Concerning the gods, I have no means of knowing whether they exist or not or of what sort they may be, because of the obscurity of the subject, and the brevity of human life -- Protagoras --b2ktwntdbf0dPnbx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZXyYBAAKCRBhHseHBAsP q0XjAJ49zVMeP/HszaDhuPIxfzoI+YrYXwCfQN6skrd7WlE8NiFnVnxnBfM62VM= =fy50 -----END PGP SIGNATURE----- --b2ktwntdbf0dPnbx-- --===============7704598864140395311== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --===============7704598864140395311==--