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 6155544A42 for ; Thu, 5 Jan 2023 20:22:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8F6CB68BD7B; Thu, 5 Jan 2023 22:22:01 +0200 (EET) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1B33568BA8D for ; Thu, 5 Jan 2023 22:21:55 +0200 (EET) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 321E8C000A for ; Thu, 5 Jan 2023 20:21:52 +0000 (UTC) Date: Thu, 5 Jan 2023 21:21:50 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230105202150.GC4028235@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="===============5978970317740912723==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============5978970317740912723== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UfEAyuTBtIjiZzX6" Content-Disposition: inline --UfEAyuTBtIjiZzX6 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 | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > e517e6bf054deb40fe9ff16f6ce6585c6a1fb284 0001-avfilter-af_aresample-swit= ch-to-convert-frame-API.patch > From fe951a82dc6c75eced5b306a11ea5462a245c4c3 Mon Sep 17 00:00:00 2001 > From: Paul B Mahol > Date: Wed, 4 Jan 2023 17:13:16 +0100 > Subject: [PATCH 1/3] avfilter/af_aresample: switch to convert frame API >=20 > Signed-off-by: Paul B Mahol > --- > libavfilter/af_aresample.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) >=20 > diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c > index 971c861d0e..7923377c8c 100644 > --- a/libavfilter/af_aresample.c > +++ b/libavfilter/af_aresample.c > @@ -209,18 +209,16 @@ FF_ENABLE_DEPRECATION_WARNINGS > } else { > outsamplesref->pts =3D AV_NOPTS_VALUE; > } > - n_out =3D swr_convert(aresample->swr, outsamplesref->extended_data, = n_out, > - (void *)insamplesref->extended_data, n_= in); > - if (n_out <=3D 0) { > + ret =3D swr_convert_frame(aresample->swr, outsamplesref, > + (void *)insamplesref); > + if (ret < 0) { > av_frame_free(&outsamplesref); > av_frame_free(&insamplesref); > - return 0; > + return ret; > } > =20 > aresample->more_data =3D outsamplesref->nb_samples =3D=3D n_out; // = Indicate that there is probably more data in our buffers > =20 > - outsamplesref->nb_samples =3D n_out; > - > ret =3D ff_filter_frame(outlink, outsamplesref); > av_frame_free(&insamplesref); > return ret; > --=20 > 2.37.2 This breaks libswresample with soxr exmple: ffmpeg -loglevel error -y -f s32le -acodec pcm_s32le -ar 96000 -ac 1 -i re= f-96000.raw -af aresample=3Dosr=3D44100:resampler=3Dsoxr:cutoff=3D.903:prec= ision=3D24:cheby=3D1 -f s32le -acodec pcm_s32le 96000-44100.raw before it shows no errors after it shows: =2E.. [s32le @ 0x55b8463eb580] Application provided invalid, non monotonically in= creasing dts to muxer in stream 0: 285242 >=3D 285242 [s32le @ 0x55b8463eb580] Application provided invalid, non monotonically in= creasing dts to muxer in stream 0: 286690 >=3D 286690 [s32le @ 0x55b8463eb580] Application provided invalid, non monotonically in= creasing dts to muxer in stream 0: 288138 >=3D 288138 [s32le @ 0x55b8463eb580] Application provided invalid, non monotonically in= creasing dts to muxer in stream 0: 289586 >=3D 289586 [s32le @ 0x55b8463eb580] Application provided invalid, non monotonically in= creasing dts to muxer in stream 0: 291034 >=3D 291034 [s32le @ 0x55b8463eb580] Application provided invalid, non monotonically in= creasing dts to muxer in stream 0: 291758 >=3D 291758 [s32le @ 0x55b8463eb580] Application provided invalid, non monotonically in= creasing dts to muxer in stream 0: 293206 >=3D 293206 [s32le @ 0x55b8463eb580] Application provided invalid, non monotonically in= creasing dts to muxer in stream 0: 294654 >=3D 294654 [s32le @ 0x55b8463eb580] Application provided invalid, non monotonically in= creasing dts to muxer in stream 0: 296102 >=3D 296102 [s32le @ 0x55b8463eb580] Application provided invalid, non monotonically in= creasing dts to muxer in stream 0: 297550 >=3D 297550 [s32le @ 0x55b8463eb580] Application provided invalid, non monotonically in= creasing dts to muxer in stream 0: 298998 >=3D 298998 [s32le @ 0x55b8463eb580] Application provided invalid, non monotonically in= creasing dts to muxer in stream 0: 300446 >=3D 300446 [s32le @ 0x55b8463eb580] Application provided invalid, non monotonically in= creasing dts to muxer in stream 0: 301170 >=3D 301170 [s32le @ 0x55b8463eb580] Application provided invalid, non monotonically in= creasing dts to muxer in stream 0: 302617 >=3D 302617 [s32le @ 0x55b8463eb580] Application provided invalid, non monotonically in= creasing dts to muxer in stream 0: 304065 >=3D 304065 =2E.. [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The educated differ from the uneducated as much as the living from the dead. -- Aristotle=20 --UfEAyuTBtIjiZzX6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCY7cxWAAKCRBhHseHBAsP q/N9AJ4puuWR1Qq6LLan9u+IKjeJDE8KFgCeJVqm8V0E5xqL82IPin0pok8UvsM= =B5tn -----END PGP SIGNATURE----- --UfEAyuTBtIjiZzX6-- --===============5978970317740912723== 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". --===============5978970317740912723==--