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 51F6B44A6D for ; Thu, 5 Jan 2023 20:34:43 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9EDFB68BD81; Thu, 5 Jan 2023 22:34:41 +0200 (EET) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 93B5068BD14 for ; Thu, 5 Jan 2023 22:34:35 +0200 (EET) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id C46E1FF802 for ; Thu, 5 Jan 2023 20:34:34 +0000 (UTC) Date: Thu, 5 Jan 2023 21:34:33 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230105203433.GD4028235@pb2> References: MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] swresample fixes 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="===============3253019879975673941==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============3253019879975673941== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jKBxcB1XkHIR0Eqt" Content-Disposition: inline --jKBxcB1XkHIR0Eqt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 04, 2023 at 05:59:14PM +0100, Paul B Mahol wrote: > Patches attached. > af_aresample.c | 6 ++++++ > 1 file changed, 6 insertions(+) > 94dacb46103e2bb9fbb6e1ca40675243d15069cd 0003-avfilter-af_aresample-if-f= rame-parameters-change-upd.patch > From 3959bcb707f52339bac41acc9aec856cad3aced1 Mon Sep 17 00:00:00 2001 > From: Paul B Mahol > Date: Wed, 4 Jan 2023 17:55:10 +0100 > Subject: [PATCH 3/3] avfilter/af_aresample: if frame parameters change up= date > swr context >=20 > Signed-off-by: Paul B Mahol > --- > libavfilter/af_aresample.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c > index 7923377c8c..2744388f75 100644 > --- a/libavfilter/af_aresample.c > +++ b/libavfilter/af_aresample.c > @@ -209,8 +209,14 @@ FF_ENABLE_DEPRECATION_WARNINGS > } else { > outsamplesref->pts =3D AV_NOPTS_VALUE; > } > +again: > ret =3D swr_convert_frame(aresample->swr, outsamplesref, > (void *)insamplesref); > + if (ret & (AVERROR_INPUT_CHANGED | AVERROR_OUTPUT_CHANGED)) { > + swr_close(aresample->swr); > + goto again; > + } > + > if (ret < 0) { > av_frame_free(&outsamplesref); > av_frame_free(&insamplesref); Are you sure this is not missing some flushing of internal samples ? thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No snowflake in an avalanche ever feels responsible. -- Voltaire --jKBxcB1XkHIR0Eqt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCY7c0UgAKCRBhHseHBAsP q7Q/AJ41GgOzKTUG9iPbYrSQeQlDGy5PsQCfQ3pkSIuSAhgl5vKzK43ryHhSuwg= =ynNj -----END PGP SIGNATURE----- --jKBxcB1XkHIR0Eqt-- --===============3253019879975673941== 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". --===============3253019879975673941==--