[FFmpeg-cvslog] r24228 - trunk/libavcodec/avfft.c

mru subversion
Tue Jul 13 08:54:31 CEST 2010


Author: mru
Date: Tue Jul 13 08:54:31 2010
New Revision: 24228

Log:
100l: really fix fft external API init functions

Modified:
   trunk/libavcodec/avfft.c

Modified: trunk/libavcodec/avfft.c
==============================================================================
--- trunk/libavcodec/avfft.c	Tue Jul 13 02:49:30 2010	(r24227)
+++ trunk/libavcodec/avfft.c	Tue Jul 13 08:54:31 2010	(r24228)
@@ -26,9 +26,7 @@ FFTContext *av_fft_init(int nbits, int i
 {
     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 
 {
     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, enu
 {
     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 
 {
     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;



More information about the ffmpeg-cvslog mailing list