plugins: use g_clear_object() to unref sinkpad_buffer_pool

https://bugzilla.gnome.org/show_bug.cgi?id=792620
This commit is contained in:
Víctor Manuel Jáquez Leal 2018-01-17 17:26:24 +01:00
parent d26dc92021
commit 9933dcb218

View file

@ -321,10 +321,8 @@ gst_vaapi_plugin_base_close (GstVaapiPluginBase * plugin)
gst_caps_replace (&plugin->sinkpad_caps, NULL);
gst_video_info_init (&plugin->sinkpad_info);
if (plugin->sinkpad_buffer_pool) {
gst_object_unref (plugin->sinkpad_buffer_pool);
plugin->sinkpad_buffer_pool = NULL;
}
g_clear_object (&plugin->sinkpad_buffer_pool);
g_clear_object (&plugin->srcpad_buffer_pool);
g_clear_object (&plugin->sinkpad_allocator);