diff options
author | Måns Rullgård <mans@mansr.com> | 2010-07-13 06:54:31 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2010-07-13 06:54:31 +0000 |
commit | 943ebf2c4e2920371b9b60afb69470af20fe2d0f (patch) | |
tree | fe3cc9adf71a662210d8ef70776a5309e8103d12 /libavcodec/avfft.c | |
parent | afa4248e4ec0327992ed0ee8bb27f9d297a89a32 (diff) | |
download | ffmpeg-943ebf2c4e2920371b9b60afb69470af20fe2d0f.tar.gz |
100l: really fix fft external API init functions
Originally committed as revision 24228 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/avfft.c')
-rw-r--r-- | libavcodec/avfft.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/libavcodec/avfft.c b/libavcodec/avfft.c index 6e268839b7..a278aa94ed 100644 --- a/libavcodec/avfft.c +++ b/libavcodec/avfft.c @@ -26,9 +26,7 @@ FFTContext *av_fft_init(int nbits, int inverse) { FFTContext *s = av_malloc(sizeof(*s)); - if (s) - ff_fft_init(s, nbits, inverse); - else + if (s && ff_fft_init(s, nbits, inverse)) av_freep(&s); return s; @@ -58,9 +56,7 @@ FFTContext *av_mdct_init(int nbits, int inverse, double scale) { FFTContext *s = av_malloc(sizeof(*s)); - if (s) - ff_mdct_init(s, nbits, inverse, scale); - else + if (s && ff_mdct_init(s, nbits, inverse, scale)) av_freep(&s); return s; @@ -97,9 +93,7 @@ RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans) { RDFTContext *s = av_malloc(sizeof(*s)); - if (s) - ff_rdft_init(s, nbits, trans); - else + if (s && ff_rdft_init(s, nbits, trans)) av_freep(&s); return s; @@ -126,9 +120,7 @@ DCTContext *av_dct_init(int nbits, enum DCTTransformType inverse) { DCTContext *s = av_malloc(sizeof(*s)); - if (s) - ff_dct_init(s, nbits, inverse); - else + if (s && (ff_dct_init(s, nbits, inverse))) av_freep(&s); return s; |