summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline.c
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2009-02-22 17:14:44 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2009-02-22 17:14:44 +0000
commit1fbacf6f284e43d6c36a34447b4b7381909a6134 (patch)
treefa8b359c64162ede0a17a714127289151b555bad /legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline.c
parent2c65d617310b933db2b6a05fb39ac32c20bc4044 (diff)
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 <lars@segv.dk> SVN revision: 39145
Diffstat (limited to '')
-rw-r--r--legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline.c6
1 files 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,
93 GstElement *queue; 93 GstElement *queue;
94 GstPad *videopad; 94 GstPad *videopad;
95 95
96 vsink = (Emotion_Video_Sink *)malloc(sizeof(Emotion_Video_Sink)); 96 vsink = (Emotion_Video_Sink *)calloc(1, sizeof(Emotion_Video_Sink));
97 if (!vsink) return; 97 if (!vsink) return;
98 if (!ecore_list_append(ev->video_sinks, vsink)) 98 if (!ecore_list_append(ev->video_sinks, vsink))
99 { 99 {
@@ -121,7 +121,7 @@ file_new_decoded_pad_cb(GstElement *decodebin,
121 Emotion_Audio_Sink *asink; 121 Emotion_Audio_Sink *asink;
122 GstPad *audiopad; 122 GstPad *audiopad;
123 123
124 asink = (Emotion_Audio_Sink *)malloc(sizeof(Emotion_Audio_Sink)); 124 asink = (Emotion_Audio_Sink *)calloc(1, sizeof(Emotion_Audio_Sink));
125 if (!asink) return; 125 if (!asink) return;
126 if (!ecore_list_append(ev->audio_sinks, asink)) 126 if (!ecore_list_append(ev->audio_sinks, asink))
127 { 127 {
@@ -146,7 +146,7 @@ emotion_video_sink_new(Emotion_Gstreamer_Video *ev)
146 146
147 if (!ev) return NULL; 147 if (!ev) return NULL;
148 148
149 vsink = (Emotion_Video_Sink *)malloc(sizeof(Emotion_Video_Sink)); 149 vsink = (Emotion_Video_Sink *)calloc(1, sizeof(Emotion_Video_Sink));
150 if (!vsink) return NULL; 150 if (!vsink) return NULL;
151 151
152 if (!ecore_list_append(ev->video_sinks, vsink)) 152 if (!ecore_list_append(ev->video_sinks, vsink))