bufferpool:check caps argument
authorWim Taymans <wim.taymans@collabora.co.uk>
Mon, 18 Jun 2012 08:13:38 +0000 (10:13 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Mon, 18 Jun 2012 08:13:38 +0000 (10:13 +0200)
Caps should be NULL or fixed when configured in a bufferpool

gst/gstbufferpool.c
gst/gstbufferpool.h

index d7a09d1..ab212b5 100644 (file)
@@ -685,6 +685,7 @@ gst_buffer_pool_config_set_params (GstStructure * config, GstCaps * caps,
 {
   g_return_if_fail (config != NULL);
   g_return_if_fail (max_buffers == 0 || min_buffers <= max_buffers);
+  g_return_if_fail (caps == NULL || gst_caps_is_fixed (caps));
 
   gst_structure_id_set (config,
       GST_QUARK (CAPS), GST_TYPE_CAPS, caps,
index ed26bb5..3527040 100644 (file)
@@ -179,7 +179,6 @@ GstStructure *   gst_buffer_pool_get_config      (GstBufferPool *pool);
 const gchar **   gst_buffer_pool_get_options     (GstBufferPool *pool);
 gboolean         gst_buffer_pool_has_option      (GstBufferPool *pool, const gchar *option);
 
-
 /* helpers for configuring the config structure */
 void             gst_buffer_pool_config_set_params    (GstStructure *config, GstCaps *caps,
                                                        guint size, guint min_buffers, guint max_buffers);