summaryrefslogtreecommitdiff
path: root/gst-libs/gst/d3d11
diff options
context:
space:
mode:
authorSeungha Yang <seungha@centricular.com>2021-03-02 21:10:24 +0900
committerSeungha Yang <seungha@centricular.com>2021-03-02 23:10:46 +0900
commit646c34794feedb8d4d979f4168119a5c042af04c (patch)
treedcb6d9b7d08976915ca995ba742d5a8d8b2b242d /gst-libs/gst/d3d11
parent47bcd62d1dd21e506f14e79a4619fd307553f425 (diff)
downloadgstreamer-plugins-bad-646c34794feedb8d4d979f4168119a5c042af04c.tar.gz
d3d11memory: Fix for wrong texture_array_size returns
Fix mismatched return values Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
Diffstat (limited to 'gst-libs/gst/d3d11')
-rw-r--r--gst-libs/gst/d3d11/gstd3d11memory.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gst-libs/gst/d3d11/gstd3d11memory.c b/gst-libs/gst/d3d11/gstd3d11memory.c
index 2e2ecbe32..0c96d7f31 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);
}