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
This commit is contained in:
Hyunjun Ko 2017-04-27 14:42:55 +09:00 committed by Víctor Manuel Jáquez Leal
parent 158b44fc1e
commit cce5ce4a9d

View file

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