summaryrefslogtreecommitdiff
path: root/gst-libs/gst/basecamerabinsrc
diff options
context:
space:
mode:
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>2011-10-03 15:26:14 -0300
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>2011-10-03 16:16:23 -0300
commit21653a793a25126b0953f15361149c33601f2d33 (patch)
tree8a59d6b873ca9b85f55f2a8f08c46b58863f3bae /gst-libs/gst/basecamerabinsrc
parent24241b809e1bbdf0021b9fc5c472a4273d8bab51 (diff)
downloadgstreamer-plugins-bad-21653a793a25126b0953f15361149c33601f2d33.tar.gz
camerabin2: Initialize camerabin2 preview pipeline data with 0
Use g_new0 to initialize all fields with 0 to only cleanup what has been initialized. This makes cleanup work correctly when some initialization fails and pointers are left in some inconsistent state.
Diffstat (limited to 'gst-libs/gst/basecamerabinsrc')
-rw-r--r--gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c b/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c
index c221ed9e2..88162ff3e 100644
--- a/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c
+++ b/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c
@@ -131,7 +131,7 @@ gst_camerabin_create_preview_pipeline (GstElement * element,
GstBus *bus;
GstAppSinkCallbacks callbacks = { 0, };
- data = g_new (GstCameraBinPreviewPipelineData, 1);
+ data = g_new0 (GstCameraBinPreviewPipelineData, 1);
data->pipeline = gst_pipeline_new ("preview-pipeline");
data->appsrc = gst_element_factory_make ("appsrc", "preview-appsrc");