summaryrefslogtreecommitdiff
path: root/src/post/planar/noise.c
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-12 12:31:40 +0100
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-12 12:31:40 +0100
commit2e3f351aab6f653313d113f0d2ec0374c2d7aee4 (patch)
treed2243a5002904e2467767cdc92ac54522aa03a93 /src/post/planar/noise.c
parent3999004c72e12aa3f718ae08c1fec5d50753af65 (diff)
downloadxine-lib-2e3f351aab6f653313d113f0d2ec0374c2d7aee4.tar.gz
xine-lib-2e3f351aab6f653313d113f0d2ec0374c2d7aee4.tar.bz2
Replace usage of xine_xmalloc_aligned() with av_mallocz() from libavutil, link plugins needing it to libavutil.
Diffstat (limited to 'src/post/planar/noise.c')
-rw-r--r--src/post/planar/noise.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/post/planar/noise.c b/src/post/planar/noise.c
index 8c04f2e72..6ca1ec967 100644
--- a/src/post/planar/noise.c
+++ b/src/post/planar/noise.c
@@ -27,6 +27,8 @@
#include <math.h>
#include <pthread.h>
+/* libavutil from FFmpeg */
+#include <mem.h>
#ifdef ARCH_X86_64
# define REG_a "rax"
@@ -55,7 +57,6 @@ typedef struct noise_param_t {
shiftptr;
int8_t *noise,
*prev_shift[MAX_RES][3];
- void *base;
} noise_param_t;
static int nonTempRandShift[MAX_RES]= {-1};
@@ -72,9 +73,8 @@ static int8_t *initNoise(noise_param_t *fp){
int pattern= fp->pattern;
int8_t *noise;
int i, j;
- void *base;
- noise = xine_xmalloc_aligned(16, MAX_NOISE*sizeof(int8_t), &base);
+ noise = av_mallocz(MAX_NOISE*sizeof(int8_t));
srand(123457);
for(i=0,j=0; i<MAX_NOISE; i++,j++)
@@ -130,7 +130,6 @@ static int8_t *initNoise(noise_param_t *fp){
}
fp->noise= noise;
- fp->base = base;
fp->shiftptr= 0;
return noise;
}
@@ -537,6 +536,8 @@ static void noise_dispose(post_plugin_t *this_gen)
if (_x_post_dispose(this_gen)) {
pthread_mutex_destroy(&this->lock);
+ av_free(this->params[0].noise);
+ av_free(this->params[1].noise);
free(this);
}
}