mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-07 07:55:41 +00:00
d3d12encoder: Fix buffer pool leak
Add missing buffer pool release Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6637>
This commit is contained in:
parent
e87ecf448b
commit
4313083584
1 changed files with 5 additions and 0 deletions
|
@ -69,6 +69,9 @@ struct EncoderSessionData
|
||||||
|
|
||||||
~EncoderSessionData ()
|
~EncoderSessionData ()
|
||||||
{
|
{
|
||||||
|
if (upload_pool)
|
||||||
|
gst_buffer_pool_set_active (upload_pool, FALSE);
|
||||||
|
gst_clear_object (&upload_pool);
|
||||||
gst_clear_object (&encoder_pool);
|
gst_clear_object (&encoder_pool);
|
||||||
gst_queue_array_free (output_queue);
|
gst_queue_array_free (output_queue);
|
||||||
}
|
}
|
||||||
|
@ -463,11 +466,13 @@ gst_d3d12_encoder_create_upload_pool (GstD3D12Encoder * self)
|
||||||
|
|
||||||
if (!gst_buffer_pool_set_config (pool, config)) {
|
if (!gst_buffer_pool_set_config (pool, config)) {
|
||||||
GST_ERROR_OBJECT (self, "Set config failed");
|
GST_ERROR_OBJECT (self, "Set config failed");
|
||||||
|
gst_object_unref (pool);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gst_buffer_pool_set_active (pool, TRUE)) {
|
if (!gst_buffer_pool_set_active (pool, TRUE)) {
|
||||||
GST_ERROR_OBJECT (self, "Set active failed");
|
GST_ERROR_OBJECT (self, "Set active failed");
|
||||||
|
gst_object_unref (pool);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue