plugins: retry pool config

if gst_buffer_pool_set_config returns FALSE, check the modified
config and retry set_config if the config is still acceptable.

Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=766184
This commit is contained in:
Scott D Phillips 2016-06-13 10:48:41 -07:00 committed by Víctor Manuel Jáquez Leal
parent fec82052d5
commit 2e5367a23c

View file

@ -597,8 +597,18 @@ gst_vaapi_plugin_base_create_pool (GstVaapiPluginBase * plugin, GstCaps * caps,
#endif
if (allocator)
gst_buffer_pool_config_set_allocator (config, allocator, NULL);
if (!gst_buffer_pool_set_config (pool, config))
goto error_pool_config;
if (!gst_buffer_pool_set_config (pool, config)) {
config = gst_buffer_pool_get_config (pool);
if (!gst_buffer_pool_config_validate_params (config, caps, size,
min_buffers, max_buffers)) {
gst_structure_free (config);
goto error_pool_config;
}
if (!gst_buffer_pool_set_config (pool, config))
goto error_pool_config;
}
return pool;
/* ERRORS */