mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 18:35:35 +00:00
d3d11memory: Fix potential crash in GstD3D11PoolAllocator
Allocator object can be the final refcount holder, when a GstD3D11Memory is being released. Do unref allocator once there's no more remaining operation. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3726>
This commit is contained in:
parent
230ecf3cd9
commit
af97e98315
1 changed files with 2 additions and 1 deletions
|
@ -1826,12 +1826,13 @@ gst_d3d11_pool_allocator_release_memory (GstD3D11PoolAllocator * self,
|
|||
|
||||
GST_MINI_OBJECT_CAST (mem)->dispose = NULL;
|
||||
mem->allocator = (GstAllocator *) gst_object_ref (_d3d11_memory_allocator);
|
||||
gst_object_unref (self);
|
||||
|
||||
/* keep it around in our queue */
|
||||
gst_atomic_queue_push (self->priv->queue, mem);
|
||||
gst_poll_write_control (self->priv->poll);
|
||||
dec_outstanding (self);
|
||||
|
||||
gst_object_unref (self);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
Loading…
Reference in a new issue