summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-07-04 15:25:28 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-07-04 15:25:28 +0200
commitb627f62de4dbc6c3b56126bf26be0de7ad4f65d3 (patch)
tree68adfeaec31f102bc11b2db4b36a71b8a21cfea9 /src
parent2de9ee797a52d7e4066468956c00740d0855db1e (diff)
downloadxine-lib-b627f62de4dbc6c3b56126bf26be0de7ad4f65d3.tar.gz
xine-lib-b627f62de4dbc6c3b56126bf26be0de7ad4f65d3.tar.bz2
Use calloc to allocate the lists of audio and video ports.
--HG-- extra : transplant_source : T6%E7%60%7F%D4%60%C8l4%9AX%97%86hrR%AD%13%C0
Diffstat (limited to 'src')
-rw-r--r--src/xine-engine/post.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/xine-engine/post.c b/src/xine-engine/post.c
index 4d8032bc0..af791c1f7 100644
--- a/src/xine-engine/post.c
+++ b/src/xine-engine/post.c
@@ -30,13 +30,10 @@
void _x_post_init(post_plugin_t *post, int num_audio_inputs, int num_video_inputs) {
- int audio_inputs_size = (num_audio_inputs + 1) * sizeof(xine_audio_port_t *);
- int video_inputs_size = (num_video_inputs + 1) * sizeof(xine_video_port_t *);
-
post->input = xine_list_new();
post->output = xine_list_new();
- post->xine_post.audio_input = (xine_audio_port_t **)xine_xmalloc(audio_inputs_size);
- post->xine_post.video_input = (xine_video_port_t **)xine_xmalloc(video_inputs_size);
+ post->xine_post.audio_input = calloc(num_audio_inputs + 1, sizeof(xine_audio_port_t *));
+ post->xine_post.audio_input = calloc(num_video_inputs + 1, sizeof(xine_video_port_t *));
}