diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-03 14:39:43 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-03 14:52:38 +0100 |
commit | e316caf712b24fecbc1688c25e858618bca69e02 (patch) | |
tree | 16f13b457b2878b1a41699f942b20399412a39c3 /libavcodec/opusdec.c | |
parent | 9fa056ba75c089b5120366ab7c5ce8cc4c5bd67a (diff) | |
download | ffmpeg-e316caf712b24fecbc1688c25e858618bca69e02.tar.gz |
avcodec/opusdec: Use avpriv_float_dsp_alloc()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/opusdec.c')
-rw-r--r-- | libavcodec/opusdec.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/opusdec.c b/libavcodec/opusdec.c index 3ce519d1dc..759eaa529c 100644 --- a/libavcodec/opusdec.c +++ b/libavcodec/opusdec.c @@ -535,7 +535,7 @@ static int opus_decode_packet(AVCodecContext *avctx, void *data, } if (c->gain_i) { - c->fdsp.vector_fmul_scalar((float*)frame->extended_data[i], + c->fdsp->vector_fmul_scalar((float*)frame->extended_data[i], (float*)frame->extended_data[i], c->gain, FFALIGN(decoded_samples, 8)); } @@ -589,6 +589,7 @@ static av_cold int opus_decode_close(AVCodecContext *avctx) c->nb_streams = 0; av_freep(&c->channel_maps); + av_freep(&c->fdsp); return 0; } @@ -601,7 +602,9 @@ static av_cold int opus_decode_init(AVCodecContext *avctx) avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; avctx->sample_rate = 48000; - avpriv_float_dsp_init(&c->fdsp, 0); + c->fdsp = avpriv_float_dsp_alloc(0); + if (!c->fdsp) + return AVERROR(ENOMEM); /* find out the channel configuration */ ret = ff_opus_parse_extradata(avctx, c); @@ -630,7 +633,7 @@ static av_cold int opus_decode_init(AVCodecContext *avctx) s->redundancy_output[j] = s->redundancy_buf[j]; } - s->fdsp = &c->fdsp; + s->fdsp = c->fdsp; s->swr =swr_alloc(); if (!s->swr) |