History

avfilter/af_headphone: Avoid allocating array

Andreas Rheinhardt committed 6 years ago

Commit 6ada3c81 parent 6d0d25e1 file · +1 −6Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/af_headphone.c+1−6
@@ -79,7 +79,7 @@ typedef struct HeadphoneContext { · 78 unmodified lines
7979 struct hrir_inputs {
8080 int ir_len;
8181 int eof;
82− } *hrir_in;
82+ } hrir_in[64];
8383 uint64_t mapping[64];
8484 } HeadphoneContext;
8585
@@ -654,10 +654,6 @@ static av_cold int init(AVFilterContext *ctx) · 568 unmodified lines
654654
655655 parse_map(ctx);
656656
657− s->hrir_in = av_calloc(s->nb_hrir_inputs, sizeof(*s->hrir_in));
658− if (!s->hrir_in)
659− return AVERROR(ENOMEM);
660−
661657 for (i = 0; i < s->nb_hrir_inputs; i++) {
662658 char *name = av_asprintf("hrir%d", i);
663659 AVFilterPad pad = {
@@ -721,7 +717,6 @@ static av_cold void uninit(AVFilterContext *ctx) · 57 unmodified lines
721717 av_freep(&s->data_hrtf[1]);
722718 av_freep(&s->fdsp);
723719
724− av_freep(&s->hrir_in);
725720 for (unsigned i = 1; i < ctx->nb_inputs; i++)
726721 av_freep(&ctx->input_pads[i].name);
727722 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t