plugins: remove sink pad allocator if caps change

If the negotiated sinkpad caps change, destroy the assignated allocator,
because it is not valid anymore.
This commit is contained in:
Víctor Manuel Jáquez Leal 2016-07-19 19:27:27 +02:00
parent 0541ef4510
commit 01b5ed3edb

View file

@ -616,6 +616,7 @@ ensure_sinkpad_buffer_pool (GstVaapiPluginBase * plugin, GstCaps * caps)
return TRUE; return TRUE;
gst_buffer_pool_set_active (plugin->sinkpad_buffer_pool, FALSE); gst_buffer_pool_set_active (plugin->sinkpad_buffer_pool, FALSE);
g_clear_object (&plugin->sinkpad_buffer_pool); g_clear_object (&plugin->sinkpad_buffer_pool);
g_clear_object (&plugin->sinkpad_allocator);
plugin->sinkpad_buffer_size = 0; plugin->sinkpad_buffer_size = 0;
} }