mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
camerabin2: Some memleak fixes
This commit is contained in:
parent
5fd15521e2
commit
79bb475abe
2 changed files with 4 additions and 1 deletions
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue