[FFmpeg-devel] [PATCH] swresample fixes
Paul B Mahol
onemda at gmail.com
Wed Jan 4 19:35:30 EET 2023
On Wed, Jan 4, 2023 at 6:26 PM Andreas Rheinhardt <
andreas.rheinhardt at outlook.com> wrote:
> Paul B Mahol:
> > 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)) {
>
> This is wrong: There are lots of errors besides AVERROR_INPUT_CHANGED,
> AVERROR_OUTPUT_CHANGED and AVERROR_INPUT_CHANGED |
> AVERROR_OUTPUT_CHANGED for which this condition is true. See also ticket
> #9343.
>
So what you propose?
>
> > + swr_close(aresample->swr);
> > + goto again;
> > + }
> > +
> > if (ret < 0) {
> > av_frame_free(&outsamplesref);
> > av_frame_free(&insamplesref);
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
More information about the ffmpeg-devel
mailing list