summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2017-05-15 19:51:47 +0300
committerSebastian Dröge <sebastian@centricular.com>2017-05-17 10:41:01 +0300
commit2c6016667b11a8e3e461fc3a8f234fda01834e50 (patch)
treed2c06b1334f4dd3bded9f69483e62dc3fcd4b4ef
parentdefbe06d0e4231df1a4c999758ecad02f6be7537 (diff)
gst: Clear floating flag in constructor of all GstObject subclasses that are not owned by any parent
https://bugzilla.gnome.org/show_bug.cgi?id=743062
-rw-r--r--sys/v4l2/gstv4l2allocator.c1
-rw-r--r--sys/v4l2/gstv4l2bufferpool.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/sys/v4l2/gstv4l2allocator.c b/sys/v4l2/gstv4l2allocator.c
index 20473830a..5a5f2b86b 100644
--- a/sys/v4l2/gstv4l2allocator.c
+++ b/sys/v4l2/gstv4l2allocator.c
@@ -639,6 +639,7 @@ gst_v4l2_allocator_new (GstObject * parent, gint video_fd,
g_free (parent_name);
allocator = g_object_new (GST_TYPE_V4L2_ALLOCATOR, "name", name, NULL);
+ gst_object_ref_sink (allocator);
g_free (name);
/* Save everything */
diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c
index 48cda0f7e..8b70b98dd 100644
--- a/sys/v4l2/gstv4l2bufferpool.c
+++ b/sys/v4l2/gstv4l2bufferpool.c
@@ -1589,6 +1589,7 @@ gst_v4l2_buffer_pool_new (GstV4l2Object * obj, GstCaps * caps)
pool = (GstV4l2BufferPool *) g_object_new (GST_TYPE_V4L2_BUFFER_POOL,
"name", name, NULL);
+ g_object_ref_sink (pool);
g_free (name);
gst_poll_fd_init (&pool->pollfd);