glbufferpool: relax check for multiple texture targets

Only complain about multiple texture targets when _different_ texture targets
are configured.
This commit is contained in:
Alessandro Decina 2015-12-10 12:41:00 +11:00
parent 5cd0601dd5
commit 11ca761c5d

View file

@ -206,19 +206,21 @@ gst_gl_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
if (gst_buffer_pool_config_has_option (config,
GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_2D)) {
if (priv->tex_target)
if (priv->tex_target && priv->tex_target != GST_GL_TEXTURE_TARGET_2D)
multiple_texture_targets = TRUE;
priv->tex_target = GST_GL_TEXTURE_TARGET_2D;
}
if (gst_buffer_pool_config_has_option (config,
GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_RECTANGLE)) {
if (priv->tex_target)
if (priv->tex_target
&& priv->tex_target != GST_GL_TEXTURE_TARGET_RECTANGLE)
multiple_texture_targets = TRUE;
priv->tex_target = GST_GL_TEXTURE_TARGET_RECTANGLE;
}
if (gst_buffer_pool_config_has_option (config,
GST_BUFFER_POOL_OPTION_GL_TEXTURE_TARGET_EXTERNAL_OES)) {
if (priv->tex_target)
if (priv->tex_target
&& priv->tex_target != GST_GL_TEXTURE_TARGET_EXTERNAL_OES)
multiple_texture_targets = TRUE;
priv->tex_target = GST_GL_TEXTURE_TARGET_EXTERNAL_OES;
}