Commit 883d93df authored by Jesús Corrius's avatar Jesús Corrius Committed by Tim-Philipp Müller
Browse files

gst/goom/: Fix build with mingw32: use rand() instead of random() and replace...

gst/goom/: Fix build with mingw32: use rand() instead of random() and replace bzero() with memset(). Fixes #529692.

Original commit message from CVS:
Patch by: Jesús Corrius <jesus at softcatala org>
* gst/goom/filters.c: (zoomVector):
* gst/goom/goom_core.c: (init_buffers):
Fix build with mingw32: use rand() instead of random() and
replace bzero() with memset(). Fixes #529692.
parent bd8c40c0
2008-04-25 Tim-Philipp Müller <tim at centricular dot net>
Patch by: Jesús Corrius <jesus at softcatala org>
* gst/goom/filters.c: (zoomVector):
* gst/goom/goom_core.c: (init_buffers):
Fix build with mingw32: use rand() instead of random() and
replace bzero() with memset(). Fixes #529692.
2008-04-25 Wim Taymans <wim.taymans@collabora.co.uk> 2008-04-25 Wim Taymans <wim.taymans@collabora.co.uk>
   
* gst/avi/gstavidemux.c: (gst_avi_demux_combine_flows): * gst/avi/gstavidemux.c: (gst_avi_demux_combine_flows):
......
...@@ -214,8 +214,8 @@ zoomVector (ZoomFilterFXWrapperData * data, float X, float Y) ...@@ -214,8 +214,8 @@ zoomVector (ZoomFilterFXWrapperData * data, float X, float Y)
/* Noise */ /* Noise */
if (data->noisify) { if (data->noisify) {
vx += (((float) random ()) / ((float) RAND_MAX) - 0.5f) / 50.0f; vx += (((float) rand ()) / ((float) RAND_MAX) - 0.5f) / 50.0f;
vy += (((float) random ()) / ((float) RAND_MAX) - 0.5f) / 50.0f; vy += (((float) rand ()) / ((float) RAND_MAX) - 0.5f) / 50.0f;
} }
/* Hypercos */ /* Hypercos */
......
...@@ -38,11 +38,11 @@ static void ...@@ -38,11 +38,11 @@ static void
init_buffers (PluginInfo * goomInfo, int buffsize) init_buffers (PluginInfo * goomInfo, int buffsize)
{ {
goomInfo->pixel = (guint32 *) malloc (buffsize * sizeof (guint32) + 128); goomInfo->pixel = (guint32 *) malloc (buffsize * sizeof (guint32) + 128);
bzero (goomInfo->pixel, buffsize * sizeof (guint32) + 128); memset (goomInfo->pixel, 0, buffsize * sizeof (guint32) + 128);
goomInfo->back = (guint32 *) malloc (buffsize * sizeof (guint32) + 128); goomInfo->back = (guint32 *) malloc (buffsize * sizeof (guint32) + 128);
bzero (goomInfo->back, buffsize * sizeof (guint32) + 128); memset (goomInfo->back, 0, buffsize * sizeof (guint32) + 128);
goomInfo->conv = (Pixel *) malloc (buffsize * sizeof (guint32) + 128); goomInfo->conv = (Pixel *) malloc (buffsize * sizeof (guint32) + 128);
bzero (goomInfo->conv, buffsize * sizeof (guint32) + 128); memset (goomInfo->conv, 0, buffsize * sizeof (guint32) + 128);
goomInfo->outputBuf = goomInfo->conv; goomInfo->outputBuf = goomInfo->conv;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment