From 646c34794feedb8d4d979f4168119a5c042af04c Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Tue, 2 Mar 2021 21:10:24 +0900 Subject: [PATCH] d3d11memory: Fix for wrong texture_array_size returns Fix mismatched return values Part-of: --- gst-libs/gst/d3d11/gstd3d11memory.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst-libs/gst/d3d11/gstd3d11memory.c b/gst-libs/gst/d3d11/gstd3d11memory.c index 2e2ecbe325..0c96d7f317 100644 --- a/gst-libs/gst/d3d11/gstd3d11memory.c +++ b/gst-libs/gst/d3d11/gstd3d11memory.c @@ -1164,9 +1164,9 @@ gst_d3d11_allocator_get_texture_array_size (GstD3D11Allocator * allocator, /* For non-array-texture memory, the size is 1 */ if (array_size) - *array_size = 1; + *array_size = priv->array_texture_size; if (num_texture_in_use) - *num_texture_in_use = priv->array_texture_size; + *num_texture_in_use = 1; /* size == 1 means we are not texture pool allocator */ if (priv->array_texture_size == 1) @@ -1174,7 +1174,7 @@ gst_d3d11_allocator_get_texture_array_size (GstD3D11Allocator * allocator, if (num_texture_in_use) { GST_D3D11_ALLOCATOR_LOCK (allocator); - *num_texture_in_use = priv->array_texture_size; + *num_texture_in_use = priv->num_array_textures_in_use; GST_D3D11_ALLOCATOR_UNLOCK (allocator); }