pool = gst_va_pool_new_with_config (caps, GST_VIDEO_INFO_SIZE (&info),
1, 0, VA_SURFACE_ATTRIB_USAGE_HINT_DECODER, GST_VA_FEATURE_AUTO,
allocator, ¶ms);
+ gst_clear_caps (&caps);
+
if (!pool) {
GST_WARNING_OBJECT (self, "Failed to create internal pool");
gst_object_unref (allocator);
- gst_clear_caps (&caps);
return NULL;
}
GstAllocationParams params = { 0, };
guint size, usage_hint = 0;
GArray *surface_formats = NULL;
- GstCaps *caps;
+ GstCaps *caps = NULL;
if (base->priv->raw_pool)
return base->priv->raw_pool;
base->priv->raw_pool = gst_va_pool_new_with_config (caps, size, 1, 0,
usage_hint, GST_VA_FEATURE_AUTO, allocator, ¶ms);
+ gst_clear_caps (&caps);
+
if (!base->priv->raw_pool) {
gst_object_unref (allocator);
return NULL;