diff --git a/gst/camerabin2/gstcamerabin2.c b/gst/camerabin2/gstcamerabin2.c index 8c2bb20c8b..8b93ad8cbd 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 057063f432..e26bd5a176 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); }