mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
plugins: destroy source pad allocator and pool
First, deactivate source pad pool when the out caps change, and if so, destroy texture map, the source pad allocator and pool only if the new caps are different from the ones already set.
This commit is contained in:
parent
8953126374
commit
3fccc83278
1 changed files with 8 additions and 2 deletions
|
@ -749,9 +749,15 @@ gst_vaapi_plugin_base_set_caps (GstVaapiPluginBase * plugin, GstCaps * incaps,
|
|||
if (outcaps && outcaps != plugin->srcpad_caps) {
|
||||
if (!gst_video_info_from_caps (&plugin->srcpad_info, outcaps))
|
||||
return FALSE;
|
||||
g_clear_object (&plugin->srcpad_allocator);
|
||||
if (plugin->srcpad_buffer_pool
|
||||
&& !gst_vaapi_buffer_pool_caps_is_equal (plugin->srcpad_buffer_pool,
|
||||
outcaps)) {
|
||||
gst_buffer_pool_set_active (plugin->srcpad_buffer_pool, FALSE);
|
||||
g_clear_object (&plugin->srcpad_buffer_pool);
|
||||
g_clear_object (&plugin->srcpad_allocator);
|
||||
plugin_reset_texture_map (plugin);
|
||||
}
|
||||
gst_caps_replace (&plugin->srcpad_caps, outcaps);
|
||||
plugin_reset_texture_map (plugin);
|
||||
}
|
||||
|
||||
if (!ensure_sinkpad_buffer_pool (plugin, plugin->sinkpad_caps))
|
||||
|
|
Loading…
Reference in a new issue