* Validate that changes made to @config are still valid in the context of the
* expected parameters. This function is a helper that can be used to validate
* changes made by a pool to a config when gst_buffer_pool_set_config()
- * returns %FALSE. This expects that @caps and @size haven't changed, and that
- * @min_buffers aren't lower then what we initially expected. This does not check
- * if options or allocator parameters.
+ * returns %FALSE. This expects that @caps haven't changed and that
+ * @min_buffers aren't lower then what we initially expected.
+ * This does not check if options or allocator parameters are still valid,
+ * won't check if size have changed, since changing the size is valid to adapt
+ * padding.
*
* Since: 1.4
*
gst_buffer_pool_config_get_params (config, &newcaps, &newsize, &newmin, NULL);
- if (gst_caps_is_equal (caps, newcaps) && (size == newsize)
+ if (gst_caps_is_equal (caps, newcaps) && (newsize >= size)
&& (newmin >= min_buffers))
ret = TRUE;
fail_unless (gst_buffer_pool_config_validate_params (config, caps, 5, 4, 0));
fail_unless (gst_buffer_pool_config_validate_params (config, caps, 5, 2, 0));
+ fail_unless (gst_buffer_pool_config_validate_params (config, caps, 4, 4, 0));
fail_if (gst_buffer_pool_config_validate_params (config, caps, 5, 6, 0));
- fail_if (gst_buffer_pool_config_validate_params (config, caps, 4, 4, 0));
gst_caps_unref (caps);
caps = gst_caps_new_empty_simple ("test/data2");