diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-08-26 06:51:18 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-09 13:47:51 +0200 |
commit | 6ada3c83681de138ab8371c5ded1c8a7a0f9d370 (patch) | |
tree | 39f9658dca53a92ae26243fb9c8e37fbd094af16 /libavfilter | |
parent | 6d0d25eca38089e207d3fcbae1d112531aaace21 (diff) | |
download | ffmpeg-6ada3c83681de138ab8371c5ded1c8a7a0f9d370.tar.gz |
avfilter/af_headphone: Avoid allocating array
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_headphone.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/libavfilter/af_headphone.c b/libavfilter/af_headphone.c index bbbe32a475..2d2b57d819 100644 --- a/libavfilter/af_headphone.c +++ b/libavfilter/af_headphone.c @@ -79,7 +79,7 @@ typedef struct HeadphoneContext { struct hrir_inputs { int ir_len; int eof; - } *hrir_in; + } hrir_in[64]; uint64_t mapping[64]; } HeadphoneContext; @@ -654,10 +654,6 @@ static av_cold int init(AVFilterContext *ctx) parse_map(ctx); - s->hrir_in = av_calloc(s->nb_hrir_inputs, sizeof(*s->hrir_in)); - if (!s->hrir_in) - return AVERROR(ENOMEM); - for (i = 0; i < s->nb_hrir_inputs; i++) { char *name = av_asprintf("hrir%d", i); AVFilterPad pad = { @@ -721,7 +717,6 @@ static av_cold void uninit(AVFilterContext *ctx) av_freep(&s->data_hrtf[1]); av_freep(&s->fdsp); - av_freep(&s->hrir_in); for (unsigned i = 1; i < ctx->nb_inputs; i++) av_freep(&ctx->input_pads[i].name); } |