Remove the const from the GstCaps.
Fix some GstStructure leaks.
GstVideoBufferPool *vpool = GST_VIDEO_BUFFER_POOL_CAST (pool);
GstVideoBufferPoolPrivate *priv = vpool->priv;
GstVideoInfo info;
- const GstCaps *caps;
+ GstCaps *caps;
gint width, height;
GstAllocator *allocator;
GstAllocationParams params;
GstXImageBufferPool *xpool = GST_XIMAGE_BUFFER_POOL_CAST (pool);
GstXImageBufferPoolPrivate *priv = xpool->priv;
GstVideoInfo info;
- const GstCaps *caps;
+ GstCaps *caps;
if (!gst_buffer_pool_config_get_params (config, &caps, NULL, NULL, NULL))
goto wrong_config;
g_mutex_unlock (ximagesink->flow_lock);
if (pool != NULL) {
- const GstCaps *pcaps;
+ GstCaps *pcaps;
/* we had a pool, check caps */
config = gst_buffer_pool_get_config (pool);
gst_object_unref (pool);
pool = NULL;
}
+ gst_structure_free (config);
}
if (pool == NULL && need_pool) {
GstVideoInfo info;
GstXvImageBufferPool *xvpool = GST_XVIMAGE_BUFFER_POOL_CAST (pool);
GstXvImageBufferPoolPrivate *priv = xvpool->priv;
GstVideoInfo info;
- const GstCaps *caps;
+ GstCaps *caps;
if (!gst_buffer_pool_config_get_params (config, &caps, NULL, NULL, NULL))
goto wrong_config;
g_mutex_unlock (xvimagesink->flow_lock);
if (pool != NULL) {
- const GstCaps *pcaps;
+ GstCaps *pcaps;
/* we had a pool, check caps */
GST_DEBUG_OBJECT (xvimagesink, "check existing pool caps");
GST_DEBUG_OBJECT (xvimagesink, "pool has different caps");
/* different caps, we can't use this pool */
gst_object_unref (pool);
- gst_structure_free (config);
pool = NULL;
}
+ gst_structure_free (config);
}
if (pool == NULL && need_pool) {
GstVideoInfo info;