summaryrefslogtreecommitdiff
path: root/libavcodec/wma.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-30 11:19:29 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-30 11:19:29 +0100
commit2fbb9e647cf45ad8d7a3e405949340c93bd01050 (patch)
treef82c8317935cce932990c65ec1d4d4a01e1eb200 /libavcodec/wma.c
parent6a2bfd52e50bf6fb87de1cb5de5b17d294f97a50 (diff)
downloadffmpeg-2fbb9e647cf45ad8d7a3e405949340c93bd01050.tar.gz
avcodec/wma: Use avpriv_float_dsp_alloc()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wma.c')
-rw-r--r--libavcodec/wma.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/wma.c b/libavcodec/wma.c
index ecc7e41a51..51fda3f22f 100644
--- a/libavcodec/wma.c
+++ b/libavcodec/wma.c
@@ -86,7 +86,6 @@ av_cold int ff_wma_init(AVCodecContext *avctx, int flags2)
return -1;
ff_fmt_convert_init(&s->fmt_conv, avctx);
- avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
if (avctx->codec->id == AV_CODEC_ID_WMAV1)
s->version = 1;
@@ -333,6 +332,10 @@ av_cold int ff_wma_init(AVCodecContext *avctx, int flags2)
#endif /* TRACE */
}
+ s->fdsp = avpriv_float_dsp_alloc(avctx->flags & CODEC_FLAG_BITEXACT);
+ if (!s->fdsp)
+ return AVERROR(ENOMEM);
+
/* choose the VLC tables for the coefficients */
coef_vlc_table = 2;
if (avctx->sample_rate >= 32000) {
@@ -383,6 +386,7 @@ int ff_wma_end(AVCodecContext *avctx)
av_freep(&s->level_table[i]);
av_freep(&s->int_table[i]);
}
+ av_freep(&s->fdsp);
return 0;
}