Commit f2d81f4c authored by Mark Nauwelaerts's avatar Mark Nauwelaerts
Browse files

bufferpool: free owned discarded pool config

parent e3328629
...@@ -503,6 +503,8 @@ gst_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config) ...@@ -503,6 +503,8 @@ gst_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
/* now we are configured */ /* now we are configured */
pool->priv->configured = TRUE; pool->priv->configured = TRUE;
} else {
gst_structure_free (config);
} }
GST_BUFFER_POOL_UNLOCK (pool); GST_BUFFER_POOL_UNLOCK (pool);
...@@ -511,12 +513,14 @@ gst_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config) ...@@ -511,12 +513,14 @@ gst_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
/* ERRORS */ /* ERRORS */
was_active: was_active:
{ {
gst_structure_free (config);
GST_WARNING_OBJECT (pool, "can't change config, we are active"); GST_WARNING_OBJECT (pool, "can't change config, we are active");
GST_BUFFER_POOL_UNLOCK (pool); GST_BUFFER_POOL_UNLOCK (pool);
return FALSE; return FALSE;
} }
have_outstanding: have_outstanding:
{ {
gst_structure_free (config);
GST_WARNING_OBJECT (pool, "can't change config, have outstanding buffers"); GST_WARNING_OBJECT (pool, "can't change config, have outstanding buffers");
GST_BUFFER_POOL_UNLOCK (pool); GST_BUFFER_POOL_UNLOCK (pool);
return FALSE; return FALSE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment