diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2007-11-21 10:18:56 +0000 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2007-11-21 10:18:56 +0000 |
commit | 82cde22e4ddcc42043b353f62304ba642ab2d4b7 (patch) | |
tree | 3bf9fc289c56b96c5a327d3e0fa127e3f87acd78 /gst/speexresample/resample.c | |
parent | 9fd560ffcae003bff7f522146db4aa880a379677 (diff) | |
download | gst-plugins-bad-82cde22e4ddcc42043b353f62304ba642ab2d4b7.tar.gz gst-plugins-bad-82cde22e4ddcc42043b353f62304ba642ab2d4b7.tar.bz2 gst-plugins-bad-82cde22e4ddcc42043b353f62304ba642ab2d4b7.zip |
gst/speexresample/README: Add README explaining where the resampling code was taken from and which changes were done.
Original commit message from CVS:
* gst/speexresample/README:
Add README explaining where the resampling code was taken from
and which changes were done.
* gst/speexresample/resample.c: (speex_alloc), (speex_realloc),
(speex_free):
Use g_malloc() and friends instead of malloc() to achieve higher
portability and define the functions inline.
* gst/speexresample/speex_resampler.h:
Add back some useless preprocessor stuff to keep the diff between
our version and the one from the Speex SVN repository lower.
Diffstat (limited to 'gst/speexresample/resample.c')
-rw-r--r-- | gst/speexresample/resample.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gst/speexresample/resample.c b/gst/speexresample/resample.c index f3c97fdd..f01574f9 100644 --- a/gst/speexresample/resample.c +++ b/gst/speexresample/resample.c @@ -62,20 +62,22 @@ #ifdef OUTSIDE_SPEEX #include <stdlib.h> -static void * +#include <glib.h> + +static inline void * speex_alloc (int size) { - return calloc (size, 1); + return g_malloc0 (size); } -static void * +static inline void * speex_realloc (void *ptr, int size) { - return realloc (ptr, size); + return g_realloc (ptr, size); } -static void +static inline void speex_free (void *ptr) { - free (ptr); + g_free (ptr); } #include "speex_resampler.h" |