On Thu, Jan 5, 2023 at 9:34 PM Michael Niedermayer <mich...@niedermayer.cc> wrote:
> 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-frame-parameters-change-upd.patch > > From 3959bcb707f52339bac41acc9aec856cad3aced1 Mon Sep 17 00:00:00 2001 > > From: Paul B Mahol <one...@gmail.com> > > Date: Wed, 4 Jan 2023 17:55:10 +0100 > > Subject: [PATCH 3/3] avfilter/af_aresample: if frame parameters change > update > > swr context > > > > Signed-off-by: Paul B Mahol <one...@gmail.com> > > --- > > libavfilter/af_aresample.c | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > 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 = AV_NOPTS_VALUE; > > } > > +again: > > ret = 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 ? > Nope, point is not to flush all internal samples at all, just enough so clicks do not happen. Clicks happen anyway so need to check why. > > thx > > [...] > > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > No snowflake in an avalanche ever feels responsible. -- Voltaire > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".