aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/avfft.c
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-07-12 19:54:16 +0000
committerMåns Rullgård <mans@mansr.com>2010-07-12 19:54:16 +0000
commitb3108447567189a7d900f411961d64bacdec1473 (patch)
treec1ea4a57edf01895fa4421ec186f95f43dc0f939 /libavcodec/avfft.c
parent862be470f3f96b7a0abc0c87fbc4ad463571ddee (diff)
downloadffmpeg-b3108447567189a7d900f411961d64bacdec1473.tar.gz
avfft: make init functions return NULL on failure as intended
Originally committed as revision 24219 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/avfft.c')
-rw-r--r--libavcodec/avfft.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/avfft.c b/libavcodec/avfft.c
index 25fc4e0955..6e268839b7 100644
--- a/libavcodec/avfft.c
+++ b/libavcodec/avfft.c
@@ -28,6 +28,8 @@ FFTContext *av_fft_init(int nbits, int inverse)
if (s)
ff_fft_init(s, nbits, inverse);
+ else
+ av_freep(&s);
return s;
}
@@ -58,6 +60,8 @@ FFTContext *av_mdct_init(int nbits, int inverse, double scale)
if (s)
ff_mdct_init(s, nbits, inverse, scale);
+ else
+ av_freep(&s);
return s;
}
@@ -95,6 +99,8 @@ RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans)
if (s)
ff_rdft_init(s, nbits, trans);
+ else
+ av_freep(&s);
return s;
}
@@ -122,6 +128,8 @@ DCTContext *av_dct_init(int nbits, enum DCTTransformType inverse)
if (s)
ff_dct_init(s, nbits, inverse);
+ else
+ av_freep(&s);
return s;
}