update for get_param changes

Remove the const from the GstCaps.
Fix some GstStructure leaks.
This commit is contained in:
Wim Taymans 2012-03-27 12:44:02 +02:00
parent 6c260d732c
commit bee3d7b683
5 changed files with 7 additions and 6 deletions

View file

@ -170,7 +170,7 @@ video_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
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;

View file

@ -481,7 +481,7 @@ ximage_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
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;

View file

@ -1440,7 +1440,7 @@ gst_ximagesink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
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);
@ -1454,6 +1454,7 @@ gst_ximagesink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
gst_object_unref (pool);
pool = NULL;
}
gst_structure_free (config);
}
if (pool == NULL && need_pool) {
GstVideoInfo info;

View file

@ -517,7 +517,7 @@ xvimage_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
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;

View file

@ -1954,7 +1954,7 @@ gst_xvimagesink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
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");
@ -1965,9 +1965,9 @@ gst_xvimagesink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
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;