From 1fbacf6f284e43d6c36a34447b4b7381909a6134 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Sun, 22 Feb 2009 17:14:44 +0000 Subject: [PATCH] Use calloc instead of malloc Use calloc instead of malloc. This will ensure that length in set to zero if no length is provided from gstreamer. By: Lars Munch SVN revision: 39145 --- .../src/modules/gstreamer/emotion_gstreamer_pipeline.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline.c b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline.c index cf1e28b796..5fcd742043 100644 --- a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline.c +++ b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline.c @@ -93,7 +93,7 @@ file_new_decoded_pad_cb(GstElement *decodebin, GstElement *queue; GstPad *videopad; - vsink = (Emotion_Video_Sink *)malloc(sizeof(Emotion_Video_Sink)); + vsink = (Emotion_Video_Sink *)calloc(1, sizeof(Emotion_Video_Sink)); if (!vsink) return; if (!ecore_list_append(ev->video_sinks, vsink)) { @@ -121,7 +121,7 @@ file_new_decoded_pad_cb(GstElement *decodebin, Emotion_Audio_Sink *asink; GstPad *audiopad; - asink = (Emotion_Audio_Sink *)malloc(sizeof(Emotion_Audio_Sink)); + asink = (Emotion_Audio_Sink *)calloc(1, sizeof(Emotion_Audio_Sink)); if (!asink) return; if (!ecore_list_append(ev->audio_sinks, asink)) { @@ -146,7 +146,7 @@ emotion_video_sink_new(Emotion_Gstreamer_Video *ev) if (!ev) return NULL; - vsink = (Emotion_Video_Sink *)malloc(sizeof(Emotion_Video_Sink)); + vsink = (Emotion_Video_Sink *)calloc(1, sizeof(Emotion_Video_Sink)); if (!vsink) return NULL; if (!ecore_list_append(ev->video_sinks, vsink))