mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
va: pool: use gst_object_replace() for allocator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1529>
This commit is contained in:
parent
f6a623d565
commit
f306b1e0fe
1 changed files with 2 additions and 4 deletions
|
@ -106,10 +106,8 @@ gst_va_pool_set_config (GstBufferPool * pool, GstStructure * config)
|
|||
GST_LOG_OBJECT (vpool, "%dx%d - %u | caps %" GST_PTR_FORMAT, width, height,
|
||||
size, caps);
|
||||
|
||||
if (vpool->allocator)
|
||||
gst_object_unref (vpool->allocator);
|
||||
if ((vpool->allocator = allocator))
|
||||
gst_object_ref (allocator);
|
||||
gst_object_replace ((GstObject **) & vpool->allocator,
|
||||
GST_OBJECT (allocator));
|
||||
|
||||
/* enable metadata based on config of the pool */
|
||||
vpool->add_videometa = gst_buffer_pool_config_has_option (config,
|
||||
|
|
Loading…
Reference in a new issue