no longer need ffmpeg patch0 which was for Termux
[goodguy/cinelerra.git] / cinelerra-5.1 / thirdparty / src / ffmpeg-4.3.patch4
1 diff -ruN a/libavfilter/af_aformat.c b/libavfilter/af_aformat.c
2 --- a/libavfilter/af_aformat.c  2020-06-15 12:54:24.000000000 -0600
3 +++ b/libavfilter/af_aformat.c  2020-07-10 09:24:01.659724729 -0600
4 @@ -112,6 +112,16 @@
5      return 0;
6  }
7  
8 +#define DEL_FIELD(p,mem,fld) if( p->mem ) { av_freep(&p->mem->fld); av_freep(&p->mem); }
9 +
10 +static av_cold void uninit(AVFilterContext *ctx)
11 +{
12 +    AFormatContext *s = ctx->priv;
13 +    DEL_FIELD(s, formats, formats);
14 +    DEL_FIELD(s, sample_rates, formats);
15 +    DEL_FIELD(s, channel_layouts, channel_layouts);
16 +}
17 +
18  static int query_formats(AVFilterContext *ctx)
19  {
20      AFormatContext *s = ctx->priv;
21 @@ -149,6 +159,7 @@
22      .name          = "aformat",
23      .description   = NULL_IF_CONFIG_SMALL("Convert the input audio to one of the specified formats."),
24      .init          = init,
25 +    .uninit        = uninit,
26      .query_formats = query_formats,
27      .priv_size     = sizeof(AFormatContext),
28      .priv_class    = &aformat_class,