mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
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:
parent
77a4f5865b
commit
18fe3ed9fa
3 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -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 =
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue