summaryrefslogtreecommitdiff
path: root/src/post
diff options
context:
space:
mode:
Diffstat (limited to 'src/post')
-rw-r--r--src/post/audio/stretch.c6
-rw-r--r--src/post/audio/upmix.c4
-rw-r--r--src/post/audio/upmix_mono.c34
-rw-r--r--src/post/audio/volnorm.c7
-rw-r--r--src/post/deinterlace/xine_plugin.c4
-rw-r--r--src/post/goom/goom_core.c4
-rw-r--r--src/post/goom/xine_goom.c4
-rw-r--r--src/post/mosaico/mosaico.c13
-rw-r--r--src/post/mosaico/switch.c4
-rw-r--r--src/post/planar/boxblur.c2
-rw-r--r--src/post/planar/denoise3d.c2
-rw-r--r--src/post/planar/eq.c2
-rw-r--r--src/post/planar/eq2.c29
-rw-r--r--src/post/planar/expand.c2
-rw-r--r--src/post/planar/fill.c2
-rw-r--r--src/post/planar/invert.c2
-rw-r--r--src/post/planar/noise.c2
-rw-r--r--src/post/planar/pp.c6
-rw-r--r--src/post/planar/unsharp.c9
-rw-r--r--src/post/visualizations/fftgraph.c2
-rw-r--r--src/post/visualizations/fftscope.c2
-rw-r--r--src/post/visualizations/fooviz.c2
-rw-r--r--src/post/visualizations/oscope.c2
23 files changed, 67 insertions, 79 deletions
diff --git a/src/post/audio/stretch.c b/src/post/audio/stretch.c
index 5a0382895..c082eefa6 100644
--- a/src/post/audio/stretch.c
+++ b/src/post/audio/stretch.c
@@ -152,10 +152,10 @@ static void stretchscr_exit (scr_plugin_t *scr) {
free(this);
}
-static stretchscr_t* stretchscr_init (double *stretch_factor) {
+static stretchscr_t *XINE_MALLOC stretchscr_init (double *stretch_factor) {
stretchscr_t *this;
- this = (stretchscr_t *) xine_xmalloc(sizeof(stretchscr_t));
+ this = calloc(1, sizeof(stretchscr_t));
this->scr.interface_version = 3;
this->scr.get_priority = stretchscr_get_priority;
@@ -620,7 +620,7 @@ static post_plugin_t *stretch_open_plugin(post_class_t *class_gen, int inputs,
xine_audio_port_t **audio_target,
xine_video_port_t **video_target)
{
- post_plugin_stretch_t *this = (post_plugin_stretch_t *)xine_xmalloc(sizeof(post_plugin_stretch_t));
+ post_plugin_stretch_t *this = calloc(1, sizeof(post_plugin_stretch_t));
post_in_t *input;
post_out_t *output;
xine_post_in_t *input_api;
diff --git a/src/post/audio/upmix.c b/src/post/audio/upmix.c
index 573354450..3e5c2e65b 100644
--- a/src/post/audio/upmix.c
+++ b/src/post/audio/upmix.c
@@ -181,7 +181,7 @@ static int upmix_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream,
}
pthread_mutex_lock (&this->lock);
- this->sub = xine_xmalloc(sizeof(af_sub_t));
+ this->sub = calloc(1, sizeof(af_sub_t));
if (!this->sub) {
pthread_mutex_unlock (&this->lock);
return 0;
@@ -379,7 +379,7 @@ static post_plugin_t *upmix_open_plugin(post_class_t *class_gen, int inputs,
xine_audio_port_t **audio_target,
xine_video_port_t **video_target)
{
- post_plugin_upmix_t *this = (post_plugin_upmix_t *)xine_xmalloc(sizeof(post_plugin_upmix_t));
+ post_plugin_upmix_t *this = calloc(1, sizeof(post_plugin_upmix_t));
post_in_t *input;
post_out_t *output;
xine_post_in_t *input_api;
diff --git a/src/post/audio/upmix_mono.c b/src/post/audio/upmix_mono.c
index 82ceb1877..193989586 100644
--- a/src/post/audio/upmix_mono.c
+++ b/src/post/audio/upmix_mono.c
@@ -192,32 +192,32 @@ static void upmix_mono_port_put_buffer(xine_audio_port_t *port_gen,
_x_extra_info_merge(buf1->extra_info, buf->extra_info);
{
- int step = buf->format.bits / 8;
+ const size_t step = buf->format.bits / 8;
uint8_t *src = (uint8_t *)buf->mem;
uint8_t *dst0 = (uint8_t *)buf0->mem;
uint8_t *dst1 = (uint8_t *)buf1->mem;
- int i, k;
+ int i;
for (i = 0; i < buf->num_frames / 2; i++)
{
- for (k = 0; k < step; k++)
- *dst0++ = *src++;
+ memcpy(dst0, src, step);
+ dst0 += step;
- src -= step;
+ memcpy(dst0, src, step);
+ dst0 += step;
- for (k = 0; k < step; k++)
- *dst0++ = *src++;
+ src += step;
}
for (i = buf->num_frames / 2; i < buf->num_frames; i++)
{
- for (k = 0; k < step; k++)
- *dst1++ = *src++;
+ memcpy(dst1, src, step);
+ dst1 += step;
- src -= step;
+ memcpy(dst1, src, step);
+ dst1 += step;
- for (k = 0; k < step; k++)
- *dst1++ = *src++;
+ src += step;
}
}
@@ -244,11 +244,11 @@ static void upmix_mono_port_put_buffer(xine_audio_port_t *port_gen,
_x_extra_info_merge(buf0->extra_info, buf->extra_info);
{
- int step = buf->format.bits / 8;
+ const size_t step = buf->format.bits / 8;
uint8_t *src = (uint8_t *)buf->mem;
uint8_t *dst0 = (uint8_t *)buf0->mem;
int cur_channel = this->params.channel;
- int i, j, k;
+ int i, j;
if( cur_channel >= this->channels )
cur_channel = this->channels-1;
@@ -259,8 +259,8 @@ static void upmix_mono_port_put_buffer(xine_audio_port_t *port_gen,
{
for (j = 0; j < this->channels; j++ )
{
- for (k = 0; k < step; k++)
- *dst0++ = *(src+k);
+ memcpy(dst0, src, step);
+ dst0 += step;
}
src += this->channels * step;
}
@@ -293,7 +293,7 @@ static post_plugin_t *upmix_mono_open_plugin(post_class_t *class_gen, int inputs
xine_audio_port_t **audio_target,
xine_video_port_t **video_target)
{
- post_plugin_upmix_mono_t *this = (post_plugin_upmix_mono_t *)xine_xmalloc(sizeof(post_plugin_upmix_mono_t));
+ post_plugin_upmix_mono_t *this = calloc(1, sizeof(post_plugin_upmix_mono_t));
post_in_t *input;
post_out_t *output;
xine_post_in_t *input_api;
diff --git a/src/post/audio/volnorm.c b/src/post/audio/volnorm.c
index de4ebde87..9ea774564 100644
--- a/src/post/audio/volnorm.c
+++ b/src/post/audio/volnorm.c
@@ -407,7 +407,7 @@ static post_plugin_t *volnorm_open_plugin(post_class_t *class_gen, int inputs,
xine_audio_port_t **audio_target,
xine_video_port_t **video_target)
{
- post_plugin_volnorm_t *this = (post_plugin_volnorm_t *)xine_xmalloc(sizeof(post_plugin_volnorm_t));
+ post_plugin_volnorm_t *this = calloc(1, sizeof(post_plugin_volnorm_t));
post_in_t *input;
post_out_t *output;
xine_post_in_t *input_api;
@@ -426,9 +426,8 @@ static post_plugin_t *volnorm_open_plugin(post_class_t *class_gen, int inputs,
this->mul = MUL_INIT;
this->lastavg = MID_S16;
this->idx = 0;
- for (i = 0; i < NSAMPLES; i++)
- this->mem[i].len = this->mem[i].avg = 0;
-
+ memset(this->mem, 0, sizeof(this->mem));
+
port = _x_post_intercept_audio_port(&this->post, audio_target[0], &input, &output);
port->new_port.open = volnorm_port_open;
port->new_port.close = volnorm_port_close;
diff --git a/src/post/deinterlace/xine_plugin.c b/src/post/deinterlace/xine_plugin.c
index 3d14b6325..a51712338 100644
--- a/src/post/deinterlace/xine_plugin.c
+++ b/src/post/deinterlace/xine_plugin.c
@@ -289,7 +289,7 @@ static int deinterlace_draw(vo_frame_t *frame, xine_stream_t *stream)
static void *deinterlace_init_plugin(xine_t *xine, void *data)
{
- post_class_deinterlace_t *class = (post_class_deinterlace_t *)xine_xmalloc(sizeof(post_class_deinterlace_t));
+ post_class_deinterlace_t *class = calloc(1, sizeof(post_class_deinterlace_t));
uint32_t config_flags = xine_mm_accel();
int i;
@@ -362,7 +362,7 @@ static post_plugin_t *deinterlace_open_plugin(post_class_t *class_gen, int input
xine_audio_port_t **audio_target,
xine_video_port_t **video_target)
{
- post_plugin_deinterlace_t *this = (post_plugin_deinterlace_t *)xine_xmalloc(sizeof(post_plugin_deinterlace_t));
+ post_plugin_deinterlace_t *this = calloc(1, sizeof(post_plugin_deinterlace_t));
post_in_t *input;
xine_post_in_t *input_api;
post_out_t *output;
diff --git a/src/post/goom/goom_core.c b/src/post/goom/goom_core.c
index 274059da4..b69994d8f 100644
--- a/src/post/goom/goom_core.c
+++ b/src/post/goom/goom_core.c
@@ -841,7 +841,7 @@ void update_message (PluginInfo *goomInfo, char *message) {
if (message) {
int i=1,j=0;
- sprintf (goomInfo->update_message.message, "%s", message);
+ strcpy(goomInfo->update_message.message, message);
for (j=0;goomInfo->update_message.message[j];j++)
if (goomInfo->update_message.message[j]=='\n')
i++;
@@ -855,8 +855,8 @@ void update_message (PluginInfo *goomInfo, char *message) {
char *ptr = msg;
int pos;
float ecart;
+ strncpy(msg, goomInfo->update_message.message, goomInfo->update_message.longueur);
message = msg;
- sprintf (msg, "%s", goomInfo->update_message.message);
while (!fin) {
while (1) {
diff --git a/src/post/goom/xine_goom.c b/src/post/goom/xine_goom.c
index 6971a5a1c..dfc4036f1 100644
--- a/src/post/goom/xine_goom.c
+++ b/src/post/goom/xine_goom.c
@@ -185,7 +185,7 @@ static void csc_method_changed_cb(void *data, xine_cfg_entry_t *cfg) {
static void *goom_init_plugin(xine_t *xine, void *data)
{
- post_class_goom_t *this = (post_class_goom_t *)xine_xmalloc(sizeof(post_class_goom_t));
+ post_class_goom_t *this = calloc(1, sizeof(post_class_goom_t));
config_values_t *cfg;
if (!this)
@@ -232,7 +232,7 @@ static post_plugin_t *goom_open_plugin(post_class_t *class_gen, int inputs,
xine_audio_port_t **audio_target,
xine_video_port_t **video_target)
{
- post_plugin_goom_t *this = (post_plugin_goom_t *)xine_xmalloc(sizeof(post_plugin_goom_t));
+ post_plugin_goom_t *this = calloc(1, sizeof(post_plugin_goom_t));
post_class_goom_t *class = (post_class_goom_t*) class_gen;
post_in_t *input;
post_out_t *output;
diff --git a/src/post/mosaico/mosaico.c b/src/post/mosaico/mosaico.c
index 6c01a66e1..0a4031bde 100644
--- a/src/post/mosaico/mosaico.c
+++ b/src/post/mosaico/mosaico.c
@@ -22,6 +22,10 @@
* simple video mosaico plugin
*/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#define LOG_MODULE "mosaico"
#define LOG_VERBOSE
/*
@@ -119,7 +123,7 @@ static int mosaico_draw(vo_frame_t *frame, xine_stream_t *stream);
static void *mosaico_init_plugin(xine_t *xine, void *data)
{
- post_class_mosaico_t *this = (post_class_mosaico_t *)xine_xmalloc(sizeof(post_class_mosaico_t));
+ post_class_mosaico_t *this = calloc(1, sizeof(post_class_mosaico_t));
if (!this)
return NULL;
@@ -137,7 +141,7 @@ static post_plugin_t *mosaico_open_plugin(post_class_t *class_gen, int inputs,
xine_audio_port_t **audio_target,
xine_video_port_t **video_target)
{
- post_mosaico_t *this = (post_mosaico_t *)xine_xmalloc(sizeof(post_mosaico_t));
+ post_mosaico_t *this = calloc(1, sizeof(post_mosaico_t));
post_in_t *input;
xine_post_in_t *input_api;
post_out_t *output;
@@ -155,7 +159,7 @@ static post_plugin_t *mosaico_open_plugin(post_class_t *class_gen, int inputs,
_x_post_init(&this->post, 0, inputs);
- this->pip = (mosaico_pip_t *)xine_xcalloc((inputs - 1), sizeof(mosaico_pip_t));
+ this->pip = (mosaico_pip_t *)calloc((inputs - 1), sizeof(mosaico_pip_t));
this->pip_count = inputs - 1;
pthread_cond_init(&this->vpts_limit_changed, NULL);
@@ -175,8 +179,7 @@ static post_plugin_t *mosaico_open_plugin(post_class_t *class_gen, int inputs,
this->pip[i].y = 50;
this->pip[i].w = 150;
this->pip[i].h = 150;
- this->pip[i].input_name = (char *)xine_xmalloc(sizeof("video in ") + 10);
- snprintf(this->pip[i].input_name, sizeof("video in ") + 10, "video in %d", i+1);
+ asprintf(&(this->pip[i].input_name), "video in %d", i+1);
port = _x_post_intercept_video_port(&this->post, video_target[0], &input, NULL);
port->new_port.close = mosaico_close;
diff --git a/src/post/mosaico/switch.c b/src/post/mosaico/switch.c
index a4de02715..90dbf2690 100644
--- a/src/post/mosaico/switch.c
+++ b/src/post/mosaico/switch.c
@@ -98,7 +98,7 @@ static int switch_draw(vo_frame_t *frame, xine_stream_t *stream);
static void *switch_init_plugin(xine_t *xine, void *data)
{
- post_class_switch_t *this = (post_class_switch_t *)xine_xmalloc(sizeof(post_class_switch_t));
+ post_class_switch_t *this = calloc(1, sizeof(post_class_switch_t));
if (!this)
return NULL;
@@ -116,7 +116,7 @@ static post_plugin_t *switch_open_plugin(post_class_t *class_gen, int inputs,
xine_audio_port_t **audio_target,
xine_video_port_t **video_target)
{
- post_switch_t *this = (post_switch_t *)xine_xmalloc(sizeof(post_switch_t));
+ post_switch_t *this = calloc(1, sizeof(post_switch_t));
post_in_t *input;
xine_post_in_t *input_api;
post_out_t *output;
diff --git a/src/post/planar/boxblur.c b/src/post/planar/boxblur.c
index 988729af0..b27e7e561 100644
--- a/src/post/planar/boxblur.c
+++ b/src/post/planar/boxblur.c
@@ -151,7 +151,7 @@ static post_plugin_t *boxblur_open_plugin(post_class_t *class_gen, int inputs,
xine_audio_port_t **audio_target,
xine_video_port_t **video_target)
{
- post_plugin_boxblur_t *this = (post_plugin_boxblur_t *)xine_xmalloc(sizeof(post_plugin_boxblur_t));
+ post_plugin_boxblur_t *this = calloc(1, sizeof(post_plugin_boxblur_t));
post_in_t *input;
xine_post_in_t *input_api;
post_out_t *output;
diff --git a/src/post/planar/denoise3d.c b/src/post/planar/denoise3d.c
index bec59b35f..cadaafae0 100644
--- a/src/post/planar/denoise3d.c
+++ b/src/post/planar/denoise3d.c
@@ -191,7 +191,7 @@ static post_plugin_t *denoise3d_open_plugin(post_class_t *class_gen, int inputs,
xine_audio_port_t **audio_target,
xine_video_port_t **video_target)
{
- post_plugin_denoise3d_t *this = (post_plugin_denoise3d_t *)xine_xmalloc(sizeof(post_plugin_denoise3d_t));
+ post_plugin_denoise3d_t *this = calloc(1, sizeof(post_plugin_denoise3d_t));
post_in_t *input;
xine_post_in_t *input_api;
post_out_t *output;
diff --git a/src/post/planar/eq.c b/src/post/planar/eq.c
index e62a808c1..128616e6d 100644
--- a/src/post/planar/eq.c
+++ b/src/post/planar/eq.c
@@ -243,7 +243,7 @@ static post_plugin_t *eq_open_plugin(post_class_t *class_gen, int inputs,
xine_audio_port_t **audio_target,
xine_video_port_t **video_target)
{
- post_plugin_eq_t *this = (post_plugin_eq_t *)xine_xmalloc(sizeof(post_plugin_eq_t));
+ post_plugin_eq_t *this = calloc(1, sizeof(post_plugin_eq_t));
post_in_t *input;
xine_post_in_t *input_api;
post_out_t *output;
diff --git a/src/post/planar/eq2.c b/src/post/planar/eq2.c
index 42f4580d9..c47270c2f 100644
--- a/src/post/planar/eq2.c
+++ b/src/post/planar/eq2.c
@@ -424,7 +424,7 @@ static post_plugin_t *eq2_open_plugin(post_class_t *class_gen, int inputs,
xine_audio_port_t **audio_target,
xine_video_port_t **video_target)
{
- post_plugin_eq2_t *this = (post_plugin_eq2_t *)xine_xmalloc(sizeof(post_plugin_eq2_t));
+ post_plugin_eq2_t *this = calloc(1, sizeof(post_plugin_eq2_t));
post_in_t *input;
xine_post_in_t *input_api;
post_out_t *output;
@@ -439,26 +439,15 @@ static post_plugin_t *eq2_open_plugin(post_class_t *class_gen, int inputs,
_x_post_init(&this->post, 0, 1);
- eq2 = &this->eq2;
- for (i = 0; i < 3; i++) {
- eq2->buf[i] = NULL;
- eq2->buf_w[i] = 0;
- eq2->buf_h[i] = 0;
-
- eq2->param[i].adjust = NULL;
- eq2->param[i].c = 1.0;
- eq2->param[i].b = 0.0;
- eq2->param[i].g = 1.0;
- eq2->param[i].lut_clean = 0;
- }
+ memset(&this->eq2, 0, sizeof(this->eq2));
- eq2->gamma = this->params.gamma = 1.0;
- eq2->contrast = this->params.contrast = 1.0;
- eq2->brightness = this->params.brightness = 0.0;
- eq2->saturation = this->params.saturation = 1.0;
- eq2->rgamma = this->params.rgamma = 1.0;
- eq2->ggamma = this->params.ggamma = 1.0;
- eq2->bgamma = this->params.bgamma = 1.0;
+ this->eq2.gamma = this->params.gamma = 1.0;
+ this->eq2.contrast = this->params.contrast = 1.0;
+ this->eq2.brightness = this->params.brightness = 0.0;
+ this->eq2.saturation = this->params.saturation = 1.0;
+ this->eq2.rgamma = this->params.rgamma = 1.0;
+ this->eq2.ggamma = this->params.ggamma = 1.0;
+ this->eq2.bgamma = this->params.bgamma = 1.0;
pthread_mutex_init(&this->lock, NULL);
diff --git a/src/post/planar/expand.c b/src/post/planar/expand.c
index 90547163f..3cecaf47d 100644
--- a/src/post/planar/expand.c
+++ b/src/post/planar/expand.c
@@ -145,7 +145,7 @@ static post_plugin_t *expand_open_plugin(post_class_t *class_gen, int inputs,
xine_audio_port_t **audio_target,
xine_video_port_t **video_target)
{
- post_expand_t *this = (post_expand_t *)xine_xmalloc(sizeof(post_expand_t));
+ post_expand_t *this = calloc(1, sizeof(post_expand_t));
post_in_t *input;
xine_post_in_t *input_param;
post_out_t *output;
diff --git a/src/post/planar/fill.c b/src/post/planar/fill.c
index 6dd5ce23b..5aacfd679 100644
--- a/src/post/planar/fill.c
+++ b/src/post/planar/fill.c
@@ -63,7 +63,7 @@ static post_plugin_t *fill_open_plugin(post_class_t *class_gen, int inputs,
xine_audio_port_t **audio_target,
xine_video_port_t **video_target)
{
- post_plugin_t *this = (post_plugin_t *)xine_xmalloc(sizeof(post_plugin_t));
+ post_plugin_t *this = calloc(1, sizeof(post_plugin_t));
post_in_t *input;
post_out_t *output;
post_video_port_t *port;
diff --git a/src/post/planar/invert.c b/src/post/planar/invert.c
index 8c1b6103a..17f237fd7 100644
--- a/src/post/planar/invert.c
+++ b/src/post/planar/invert.c
@@ -64,7 +64,7 @@ static post_plugin_t *invert_open_plugin(post_class_t *class_gen, int inputs,
xine_audio_port_t **audio_target,
xine_video_port_t **video_target)
{
- post_plugin_t *this = (post_plugin_t *)xine_xmalloc(sizeof(post_plugin_t));
+ post_plugin_t *this = calloc(1, sizeof(post_plugin_t));
post_in_t *input;
post_out_t *output;
post_video_port_t *port;
diff --git a/src/post/planar/noise.c b/src/post/planar/noise.c
index e7a7c3d32..8bceb2f74 100644
--- a/src/post/planar/noise.c
+++ b/src/post/planar/noise.c
@@ -466,7 +466,7 @@ static post_plugin_t *noise_open_plugin(post_class_t *class_gen, int inputs,
xine_audio_port_t **audio_target,
xine_video_port_t **video_target)
{
- post_plugin_noise_t *this = (post_plugin_noise_t *)xine_xmalloc(sizeof(post_plugin_noise_t));
+ post_plugin_noise_t *this = calloc(1, sizeof(post_plugin_noise_t));
post_in_t *input;
xine_post_in_t *input_api;
post_out_t *output;
diff --git a/src/post/planar/pp.c b/src/post/planar/pp.c
index c39db87cd..25447683a 100644
--- a/src/post/planar/pp.c
+++ b/src/post/planar/pp.c
@@ -20,6 +20,10 @@
* plugin for ffmpeg libpostprocess
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <config.h>
#include <xine/xine_internal.h>
@@ -163,7 +167,7 @@ static post_plugin_t *pp_open_plugin(post_class_t *class_gen, int inputs,
xine_audio_port_t **audio_target,
xine_video_port_t **video_target)
{
- post_plugin_pp_t *this = (post_plugin_pp_t *)xine_xmalloc(sizeof(post_plugin_pp_t));
+ post_plugin_pp_t *this = calloc(1, sizeof(post_plugin_pp_t));
post_in_t *input;
xine_post_in_t *input_api;
post_out_t *output;
diff --git a/src/post/planar/unsharp.c b/src/post/planar/unsharp.c
index 591f32a7b..2f8b74496 100644
--- a/src/post/planar/unsharp.c
+++ b/src/post/planar/unsharp.c
@@ -26,13 +26,6 @@
#include <xine/xineutils.h>
#include <pthread.h>
-#ifndef MIN
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#endif
-#ifndef MAX
-#define MAX(a,b) (((a)>(b))?(a):(b))
-#endif
-
/*===========================================================================*/
#define MIN_MATRIX_SIZE 3
@@ -284,7 +277,7 @@ static post_plugin_t *unsharp_open_plugin(post_class_t *class_gen, int inputs,
xine_audio_port_t **audio_target,
xine_video_port_t **video_target)
{
- post_plugin_unsharp_t *this = (post_plugin_unsharp_t *)xine_xmalloc(sizeof(post_plugin_unsharp_t));
+ post_plugin_unsharp_t *this = calloc(1, sizeof(post_plugin_unsharp_t));
post_in_t *input;
xine_post_in_t *input_api;
post_out_t *output;
diff --git a/src/post/visualizations/fftgraph.c b/src/post/visualizations/fftgraph.c
index 39d17c730..b881b9bec 100644
--- a/src/post/visualizations/fftgraph.c
+++ b/src/post/visualizations/fftgraph.c
@@ -415,7 +415,7 @@ static post_plugin_t *fftgraph_open_plugin(post_class_t *class_gen, int inputs,
xine_video_port_t **video_target)
{
post_class_fftgraph_t *class = (post_class_fftgraph_t *)class_gen;
- post_plugin_fftgraph_t *this = (post_plugin_fftgraph_t *)xine_xmalloc(sizeof(post_plugin_fftgraph_t));
+ post_plugin_fftgraph_t *this = calloc(1, sizeof(post_plugin_fftgraph_t));
post_in_t *input;
post_out_t *output;
post_out_t *outputv;
diff --git a/src/post/visualizations/fftscope.c b/src/post/visualizations/fftscope.c
index 1a9ea905a..eca2e2f93 100644
--- a/src/post/visualizations/fftscope.c
+++ b/src/post/visualizations/fftscope.c
@@ -435,7 +435,7 @@ static post_plugin_t *fftscope_open_plugin(post_class_t *class_gen, int inputs,
xine_audio_port_t **audio_target,
xine_video_port_t **video_target)
{
- post_plugin_fftscope_t *this = (post_plugin_fftscope_t *)xine_xmalloc(sizeof(post_plugin_fftscope_t));
+ post_plugin_fftscope_t *this = calloc(1, sizeof(post_plugin_fftscope_t));
post_class_fftscope_t *class = (post_class_fftscope_t *)class_gen;
post_in_t *input;
post_out_t *output;
diff --git a/src/post/visualizations/fooviz.c b/src/post/visualizations/fooviz.c
index 3e5702168..722ae9f7c 100644
--- a/src/post/visualizations/fooviz.c
+++ b/src/post/visualizations/fooviz.c
@@ -247,7 +247,7 @@ static post_plugin_t *fooviz_open_plugin(post_class_t *class_gen, int inputs,
xine_video_port_t **video_target)
{
post_class_fooviz_t *class = (post_class_fooviz_t *)class_gen;
- post_plugin_fooviz_t *this = (post_plugin_fooviz_t *)xine_xmalloc(sizeof(post_plugin_fooviz_t));
+ post_plugin_fooviz_t *this = calloc(1, sizeof(post_plugin_fooviz_t));
post_in_t *input;
post_out_t *output;
post_out_t *outputv;
diff --git a/src/post/visualizations/oscope.c b/src/post/visualizations/oscope.c
index 7c9faeeaa..3e783cce7 100644
--- a/src/post/visualizations/oscope.c
+++ b/src/post/visualizations/oscope.c
@@ -318,7 +318,7 @@ static post_plugin_t *oscope_open_plugin(post_class_t *class_gen, int inputs,
xine_video_port_t **video_target)
{
post_class_oscope_t *class = (post_class_oscope_t *)class_gen;
- post_plugin_oscope_t *this = (post_plugin_oscope_t *)xine_xmalloc(sizeof(post_plugin_oscope_t));
+ post_plugin_oscope_t *this = calloc(1, sizeof(post_plugin_oscope_t));
post_in_t *input;
post_out_t *output;
post_out_t *outputv;