[vlc-commits] direct3d11: fix the original picQuad position

Steve Lhomme git at videolan.org
Thu Jul 27 18:30:40 CEST 2017


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Thu Jul 27 17:46:12 2017 +0200| [f3fa48ec6077c6e32b1ce20a72bc5c00525df53e] | committer: Jean-Baptiste Kempf

direct3d11: fix the original picQuad position

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f3fa48ec6077c6e32b1ce20a72bc5c00525df53e
---

 modules/video_output/win32/direct3d11.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 570c9ec724..150bbfd0b1 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -739,10 +739,7 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned pool_size)
     if (!is_d3d11_opaque(surface_fmt.i_chroma) || sys->legacy_shader)
     {
         /* we need a staging texture */
-        video_format_t staging_fmt;
-        video_format_Copy(&staging_fmt, &surface_fmt);
-        staging_fmt.i_width = staging_fmt.i_width;
-        staging_fmt.i_height = staging_fmt.i_height;
+        video_format_t staging_fmt = surface_fmt;
         if ( sys->picQuadConfig->formatTexture != DXGI_FORMAT_R8G8B8A8_UNORM &&
              sys->picQuadConfig->formatTexture != DXGI_FORMAT_B5G6R5_UNORM )
         {
@@ -752,8 +749,8 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned pool_size)
         if (AllocateTextures(vd, sys->picQuadConfig, &staging_fmt, 1, textures, true))
             goto error;
 
-        sys->picQuad.i_x_offset = 0;
-        sys->picQuad.i_y_offset = 0;
+        sys->picQuad.i_x_offset = staging_fmt.i_x_offset;
+        sys->picQuad.i_y_offset = staging_fmt.i_y_offset;
         sys->picQuad.i_width    = staging_fmt.i_width;
         sys->picQuad.i_height   = staging_fmt.i_height;
 



More information about the vlc-commits mailing list