d3d11overlaycompositor: fix texture width and height
authorCélestin Marot <c.marot@intopix.com>
Wed, 22 Feb 2023 14:18:12 +0000 (15:18 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 23 Feb 2023 10:25:15 +0000 (10:25 +0000)
The dimension of the overlay texture directly corresponds to the size of the overlay **buffer** which is given by its video meta.
The dimension at which the overlay should be displayed directly correspond to the overlay `render_width`and `render_height`.

This match the behavior of glimagesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4053>

subprojects/gst-plugins-bad/sys/d3d11/gstd3d11overlaycompositor.cpp

index 6f46d725d7598c9ce54c1a2579170830d750ced8..f1009e426626d7c83fcbd7c07822359d2ec1f2c3 100644 (file)
@@ -211,8 +211,8 @@ gst_d3d11_composition_overlay_new (GstD3D11OverlayCompositor * self,
   subresource_data.SysMemPitch = stride;
   subresource_data.SysMemSlicePitch = 0;
 
-  texture_desc.Width = width;
-  texture_desc.Height = height;
+  texture_desc.Width = vmeta->width;
+  texture_desc.Height = vmeta->height;
   texture_desc.MipLevels = 1;
   texture_desc.ArraySize = 1;
   texture_desc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;