camerabin2: Do not forget to unref some stuff

Cleanup properly by unrefing the encoding profile and preview caps
This commit is contained in:
Thiago Santos 2011-01-26 11:40:43 -03:00
parent b66dde5746
commit 68bff61732
2 changed files with 9 additions and 0 deletions

View file

@ -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);
}

View file

@ -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);
}