videopool: avoid caps copy

Now that the caps from the bufferpool are not returned as const we
can take a ref instead of doing a copy.
This commit is contained in:
Wim Taymans 2012-03-27 15:44:59 +02:00
parent 77a4f5865b
commit 18fe3ed9fa
3 changed files with 3 additions and 3 deletions

View file

@ -195,7 +195,7 @@ video_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
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)

View file

@ -501,7 +501,7 @@ ximage_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
/* 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 =

View file

@ -538,7 +538,7 @@ xvimage_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
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 */