summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>2011-03-11 10:32:35 -0300
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>2011-03-11 18:26:43 -0300
commit79bb475abe5f4cee11e5214c9d83df9d049d2792 (patch)
tree7940f27893865b24384de7db6863f7c58b86beb3 /gst
parent5fd15521e2c1f7e2d43f1f02958b77041f81b1a7 (diff)
camerabin2: Some memleak fixes
Diffstat (limited to 'gst')
-rw-r--r--gst/camerabin2/gstcamerabin2.c4
-rw-r--r--gst/camerabin2/gstwrappercamerabinsrc.c1
2 files changed, 4 insertions, 1 deletions
diff --git a/gst/camerabin2/gstcamerabin2.c b/gst/camerabin2/gstcamerabin2.c
index 8c2bb20c8..8b93ad8cb 100644
--- a/gst/camerabin2/gstcamerabin2.c
+++ b/gst/camerabin2/gstcamerabin2.c
@@ -308,6 +308,8 @@ gst_camera_bin_dispose (GObject * object)
gst_object_unref (camerabin->audio_queue);
if (camerabin->audio_convert)
gst_object_unref (camerabin->audio_convert);
+ if (camerabin->audio_volume)
+ gst_object_unref (camerabin->audio_volume);
if (camerabin->viewfinderbin)
gst_object_unref (camerabin->viewfinderbin);
@@ -1033,7 +1035,7 @@ gst_camera_bin_change_state (GstElement * element, GstStateChange trans)
case GST_STATE_CHANGE_PAUSED_TO_READY:
if (GST_STATE (camera->videosink) >= GST_STATE_PAUSED)
gst_element_set_state (camera->videosink, GST_STATE_READY);
- if (camera->audio_src)
+ if (camera->audio_src && GST_STATE (camera->audio_src) >= GST_STATE_READY)
gst_element_set_state (camera->audio_src, GST_STATE_READY);
gst_tag_setter_reset_tags (GST_TAG_SETTER (camera));
diff --git a/gst/camerabin2/gstwrappercamerabinsrc.c b/gst/camerabin2/gstwrappercamerabinsrc.c
index 057063f43..e26bd5a17 100644
--- a/gst/camerabin2/gstwrappercamerabinsrc.c
+++ b/gst/camerabin2/gstwrappercamerabinsrc.c
@@ -58,6 +58,7 @@ gst_wrapper_camera_bin_src_dispose (GObject * object)
gst_object_unref (self->app_vid_src);
self->app_vid_src = NULL;
}
+ gst_caps_replace (&self->image_capture_caps, NULL);
G_OBJECT_CLASS (parent_class)->dispose (object);
}