Now that the caps from the bufferpool are not returned as const we
can take a ref instead of doing a copy.
if (priv->caps)
gst_caps_unref (priv->caps);
- priv->caps = gst_caps_copy (caps);
+ priv->caps = gst_caps_ref (caps);
priv->params = params;
if (priv->allocator)
/* keep track of the width and height and caps */
if (priv->caps)
gst_caps_unref (priv->caps);
- priv->caps = gst_caps_copy (caps);
+ priv->caps = gst_caps_ref (caps);
/* check for the configured metadata */
priv->add_metavideo =
if (priv->caps)
gst_caps_unref (priv->caps);
- priv->caps = gst_caps_copy (caps);
+ priv->caps = gst_caps_ref (caps);
priv->info = info;
/* enable metadata based on config of the pool */