bufferpool: Update the configure even if set_config() returned false

According to the documentation, when set_config() return false, it should be
possible to read the modified version of the config. This patch fixes the
implementation so it is now according to the documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=727916
This commit is contained in:
Nicolas Dufresne 2014-04-08 19:27:55 -04:00
parent 6079666a71
commit 43acfbbb86

View file

@ -638,15 +638,15 @@ gst_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
else
result = FALSE;
if (result) {
if (priv->config)
gst_structure_free (priv->config);
priv->config = config;
/* save the config regardless of the result so user can read back the
* modified config and evaluate if the changes are acceptable */
if (priv->config)
gst_structure_free (priv->config);
priv->config = config;
if (result) {
/* now we are configured */
priv->configured = TRUE;
} else {
gst_structure_free (config);
}
GST_BUFFER_POOL_UNLOCK (pool);