ffmpeg scan remap fix, configure.ac all or none fix, 3rd party libs: ffmpeg, turbo...
[goodguy/cinelerra.git] / cinelerra-5.1 / thirdparty / src / ffmpeg.git.patch4
1 diff --git a/libavfilter/af_aformat.c b/libavfilter/af_aformat.c
2 index 1a702778c3..232d629ba0 100644
3 --- a/libavfilter/af_aformat.c
4 +++ b/libavfilter/af_aformat.c
5 @@ -112,6 +112,16 @@ static av_cold int init(AVFilterContext *ctx)
6      return 0;
7  }
8  
9 +#define DEL_FIELD(p,mem,fld) if( p->mem ) { av_freep(&p->mem->fld); av_freep(&p->mem); }
10 +
11 +static av_cold void uninit(AVFilterContext *ctx)
12 +{
13 +    AFormatContext *s = ctx->priv;
14 +    DEL_FIELD(s, formats, formats);
15 +    DEL_FIELD(s, sample_rates, formats);
16 +    DEL_FIELD(s, channel_layouts, channel_layouts);
17 +}
18 +
19  static int query_formats(AVFilterContext *ctx)
20  {
21      AFormatContext *s = ctx->priv;
22 @@ -149,6 +159,7 @@ AVFilter ff_af_aformat = {
23      .name          = "aformat",
24      .description   = NULL_IF_CONFIG_SMALL("Convert the input audio to one of the specified formats."),
25      .init          = init,
26 +    .uninit        = uninit,
27      .query_formats = query_formats,
28      .priv_size     = sizeof(AFormatContext),
29      .priv_class    = &aformat_class,