Commit 943ebf2c authored by Måns Rullgård's avatar Måns Rullgård

100l: really fix fft external API init functions

Originally committed as revision 24228 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent afa4248e
...@@ -26,9 +26,7 @@ FFTContext *av_fft_init(int nbits, int inverse) ...@@ -26,9 +26,7 @@ FFTContext *av_fft_init(int nbits, int inverse)
{ {
FFTContext *s = av_malloc(sizeof(*s)); FFTContext *s = av_malloc(sizeof(*s));
if (s) if (s && ff_fft_init(s, nbits, inverse))
ff_fft_init(s, nbits, inverse);
else
av_freep(&s); av_freep(&s);
return s; return s;
...@@ -58,9 +56,7 @@ FFTContext *av_mdct_init(int nbits, int inverse, double scale) ...@@ -58,9 +56,7 @@ FFTContext *av_mdct_init(int nbits, int inverse, double scale)
{ {
FFTContext *s = av_malloc(sizeof(*s)); FFTContext *s = av_malloc(sizeof(*s));
if (s) if (s && ff_mdct_init(s, nbits, inverse, scale))
ff_mdct_init(s, nbits, inverse, scale);
else
av_freep(&s); av_freep(&s);
return s; return s;
...@@ -97,9 +93,7 @@ RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans) ...@@ -97,9 +93,7 @@ RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans)
{ {
RDFTContext *s = av_malloc(sizeof(*s)); RDFTContext *s = av_malloc(sizeof(*s));
if (s) if (s && ff_rdft_init(s, nbits, trans))
ff_rdft_init(s, nbits, trans);
else
av_freep(&s); av_freep(&s);
return s; return s;
...@@ -126,9 +120,7 @@ DCTContext *av_dct_init(int nbits, enum DCTTransformType inverse) ...@@ -126,9 +120,7 @@ DCTContext *av_dct_init(int nbits, enum DCTTransformType inverse)
{ {
DCTContext *s = av_malloc(sizeof(*s)); DCTContext *s = av_malloc(sizeof(*s));
if (s) if (s && (ff_dct_init(s, nbits, inverse)))
ff_dct_init(s, nbits, inverse);
else
av_freep(&s); av_freep(&s);
return s; return s;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment