summaryrefslogtreecommitdiff
path: root/src/video_out/video_out_xshm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_out/video_out_xshm.c')
-rw-r--r--src/video_out/video_out_xshm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c
index 9e901821a..74791f145 100644
--- a/src/video_out/video_out_xshm.c
+++ b/src/video_out/video_out_xshm.c
@@ -276,7 +276,7 @@ static XImage *create_ximage (xshm_driver_t *this, XShmSegmentInfo *shminfo,
this->bytes_per_pixel = this->bpp / 8;
this->image_byte_order = myimage->byte_order;
- myimage->data = xine_xmalloc (width * this->bytes_per_pixel * height);
+ myimage->data = calloc (width * height, this->bytes_per_pixel);
}
return myimage;
@@ -387,7 +387,7 @@ static vo_frame_t *xshm_alloc_frame (vo_driver_t *this_gen) {
xshm_frame_t *frame;
xshm_driver_t *this = (xshm_driver_t *) this_gen;
- frame = (xshm_frame_t *) xine_xmalloc (sizeof (xshm_frame_t));
+ frame = (xshm_frame_t *) calloc(1, sizeof(xshm_frame_t));
if (!frame)
return NULL;
@@ -1083,7 +1083,7 @@ static vo_driver_t *xshm_open_plugin_2 (video_driver_class_t *class_gen, const v
int cpu_byte_order;
XColor dummy;
- this = (xshm_driver_t *) xine_xmalloc (sizeof (xshm_driver_t));
+ this = (xshm_driver_t *) calloc(1, sizeof(xshm_driver_t));
if (!this)
return NULL;
@@ -1310,7 +1310,7 @@ static void xshm_dispose_class (video_driver_class_t *this_gen) {
}
static void *xshm_init_class (xine_t *xine, void *visual_gen) {
- xshm_class_t *this = (xshm_class_t *) xine_xmalloc (sizeof (xshm_class_t));
+ xshm_class_t *this = (xshm_class_t *) calloc(1, sizeof(xshm_class_t));
this->driver_class.open_plugin = xshm_open_plugin_old;
this->driver_class.get_identifier = xshm_get_identifier;