summaryrefslogtreecommitdiff
path: root/libavfilter/af_amix.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-18 12:24:16 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-18 12:24:16 +0100
commitaa97223f14a1aad2a54fc87dd196c2c5e6ba6f40 (patch)
treeb5e3811f5a6962310a60da6a7bbf50a520751251 /libavfilter/af_amix.c
parent06d27428995bd3ea73ca1c62640ca98893093a84 (diff)
downloadffmpeg-aa97223f14a1aad2a54fc87dd196c2c5e6ba6f40.tar.gz
avfilter/af_amix: Use avpriv_float_dsp_alloc()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/af_amix.c')
-rw-r--r--libavfilter/af_amix.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
index 47cbb45a7a..e40969f70c 100644
--- a/libavfilter/af_amix.c
+++ b/libavfilter/af_amix.c
@@ -155,7 +155,7 @@ static int frame_list_add_frame(FrameList *frame_list, int nb_samples, int64_t p
typedef struct MixContext {
const AVClass *class; /**< class for AVOptions */
- AVFloatDSPContext fdsp;
+ AVFloatDSPContext *fdsp;
int nb_inputs; /**< number of inputs */
int active_inputs; /**< number of input currently active */
@@ -298,7 +298,7 @@ static int output_frame(AVFilterLink *outlink, int nb_samples)
plane_size = FFALIGN(plane_size, 16);
for (p = 0; p < planes; p++) {
- s->fdsp.vector_fmac_scalar((float *)out_buf->extended_data[p],
+ s->fdsp->vector_fmac_scalar((float *)out_buf->extended_data[p],
(float *) in_buf->extended_data[p],
s->input_scale[i], plane_size);
}
@@ -501,7 +501,9 @@ static av_cold int init(AVFilterContext *ctx)
ff_insert_inpad(ctx, i, &pad);
}
- avpriv_float_dsp_init(&s->fdsp, 0);
+ s->fdsp = avpriv_float_dsp_alloc(0);
+ if (!s->fdsp)
+ return AVERROR(ENOMEM);
return 0;
}
@@ -520,6 +522,7 @@ static av_cold void uninit(AVFilterContext *ctx)
av_freep(&s->frame_list);
av_freep(&s->input_state);
av_freep(&s->input_scale);
+ av_freep(&s->fdsp);
for (i = 0; i < ctx->nb_inputs; i++)
av_freep(&ctx->input_pads[i].name);