update for get_param changes
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 27 Mar 2012 10:44:02 +0000 (12:44 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Tue, 27 Mar 2012 10:44:02 +0000 (12:44 +0200)
Remove the const from the GstCaps.
Fix some GstStructure leaks.

gst-libs/gst/video/gstvideopool.c
sys/ximage/ximagepool.c
sys/ximage/ximagesink.c
sys/xvimage/xvimagepool.c
sys/xvimage/xvimagesink.c

index c56a2cc..4fca40e 100644 (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;
index 46ebe7a..68cc312 100644 (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;
index 6578539..cdc8790 100644 (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;
index af8087a..840e507 100644 (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;
index 08b6a2a..10fe8fd 100644 (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;