plugins: deactivate buffer pool before unref

This buffer pool may still be processing buffers when a caps renegotiation is
done. This one-liner patch deactivates the pool to drain it before it
de-allocation.
This commit is contained in:
Víctor Manuel Jáquez Leal 2016-05-24 16:29:33 +02:00
parent b27ddd8036
commit 2fc855b134

View file

@ -503,6 +503,7 @@ ensure_sinkpad_buffer_pool (GstVaapiPluginBase * plugin, GstCaps * caps)
gst_structure_free (config);
if (!need_pool)
return TRUE;
gst_buffer_pool_set_active (plugin->sinkpad_buffer_pool, FALSE);
g_clear_object (&plugin->sinkpad_buffer_pool);
plugin->sinkpad_buffer_size = 0;
}