mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
d3d11memory: Remove GstD3D11PoolAllocator::dispose
Clear GstD3D11Device object in finalize method as well Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3715>
This commit is contained in:
parent
d8ba721d82
commit
fdc3ee97ae
1 changed files with 2 additions and 12 deletions
|
@ -1755,7 +1755,6 @@ struct _GstD3D11PoolAllocatorPrivate
|
|||
gsize mem_size;
|
||||
};
|
||||
|
||||
static void gst_d3d11_pool_allocator_dispose (GObject * object);
|
||||
static void gst_d3d11_pool_allocator_finalize (GObject * object);
|
||||
|
||||
static gboolean
|
||||
|
@ -1776,7 +1775,6 @@ gst_d3d11_pool_allocator_class_init (GstD3D11PoolAllocatorClass * klass)
|
|||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
GstD3D11AllocatorClass *d3d11alloc_class = GST_D3D11_ALLOCATOR_CLASS (klass);
|
||||
|
||||
gobject_class->dispose = gst_d3d11_pool_allocator_dispose;
|
||||
gobject_class->finalize = gst_d3d11_pool_allocator_finalize;
|
||||
|
||||
d3d11alloc_class->set_active = gst_d3d11_pool_allocator_set_active;
|
||||
|
@ -1804,16 +1802,6 @@ gst_d3d11_pool_allocator_init (GstD3D11PoolAllocator * allocator)
|
|||
gst_poll_write_control (priv->poll);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_d3d11_pool_allocator_dispose (GObject * object)
|
||||
{
|
||||
GstD3D11PoolAllocator *self = GST_D3D11_POOL_ALLOCATOR (object);
|
||||
|
||||
gst_clear_object (&self->device);
|
||||
|
||||
G_OBJECT_CLASS (pool_alloc_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_d3d11_pool_allocator_finalize (GObject * object)
|
||||
{
|
||||
|
@ -1829,6 +1817,8 @@ gst_d3d11_pool_allocator_finalize (GObject * object)
|
|||
|
||||
GST_D3D11_CLEAR_COM (priv->texture);
|
||||
|
||||
gst_clear_object (&self->device);
|
||||
|
||||
G_OBJECT_CLASS (pool_alloc_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue