mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
camerabin2: Do not forget to unref some stuff
Cleanup properly by unrefing the encoding profile and preview caps
This commit is contained in:
parent
b66dde5746
commit
68bff61732
2 changed files with 9 additions and 0 deletions
|
@ -278,6 +278,12 @@ gst_camera_bin_dispose (GObject * object)
|
|||
if (camerabin->imagebin_capsfilter)
|
||||
gst_object_unref (camerabin->imagebin_capsfilter);
|
||||
|
||||
if (camerabin->video_profile)
|
||||
gst_encoding_profile_unref (camerabin->video_profile);
|
||||
|
||||
if (camerabin->preview_caps)
|
||||
gst_caps_replace (&camerabin->preview_caps, NULL);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
|
|
|
@ -71,6 +71,9 @@ gst_wrapper_camera_bin_src_dispose (GObject * object)
|
|||
self->preview_pipeline = NULL;
|
||||
}
|
||||
|
||||
if (self->preview_caps)
|
||||
gst_caps_replace (&self->preview_caps, NULL);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue