From cce5ce4a9dd74f83224e437af9344db6b8daefdb Mon Sep 17 00:00:00 2001 From: Hyunjun Ko Date: Thu, 27 Apr 2017 14:42:55 +0900 Subject: [PATCH] vaapivideobufferpool: fix leak of created allocator Since it's created by itself, it should be unref-counted after gst_buffer_pool_config_set_allocator call. Afterwards, this allocator will be ref-counted again when assigning to priv->allocator. https://bugzilla.gnome.org/show_bug.cgi?id=781577 --- gst/vaapi/gstvaapivideobufferpool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gst/vaapi/gstvaapivideobufferpool.c b/gst/vaapi/gstvaapivideobufferpool.c index 1834bd7593..2782403a13 100644 --- a/gst/vaapi/gstvaapivideobufferpool.c +++ b/gst/vaapi/gstvaapivideobufferpool.c @@ -179,6 +179,7 @@ gst_vaapi_video_buffer_pool_set_config (GstBufferPool * pool, allocator = gst_vaapi_video_allocator_new (priv->display, &new_vip, surface_alloc_flags, 0); gst_buffer_pool_config_set_allocator (config, allocator, NULL); + gst_object_unref (allocator); } } -- 2.34.1