[vlc-devel] [PATCH 2/6] direct3d11: update the quad position using the picture placing algorithm

Steve Lhomme robux4 at videolabs.io
Thu Jul 27 17:46:09 CEST 2017


When the decoder uses a different size than what was configured in the pool.
---
 modules/video_output/win32/direct3d11.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index a68f67a407..05b1360362 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1154,15 +1154,15 @@ static void Prepare(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
             assert(p_sys->resourceView[0]!=NULL);
         }
 
-        if ( sys->picQuad.i_height != texDesc.Height ||
-             sys->picQuad.i_width != texDesc.Width )
+        if ( vd->fmt.i_height != texDesc.Height ||
+             vd->fmt.i_width != texDesc.Width )
         {
             /* the decoder produced different sizes than the vout, we need to
              * adjust the vertex */
-            sys->picQuad.i_height = texDesc.Height;
-            sys->picQuad.i_width = texDesc.Width;
-            UpdateQuadPosition( vd, &sys->picQuad, &vd->fmt,
-                                vd->fmt.projection_mode, vd->fmt.orientation );
+            vd->fmt.i_height = texDesc.Height;
+            vd->fmt.i_width = texDesc.Width;
+            UpdateRects(vd, NULL, NULL, true);
+            UpdateSize(vd);
         }
     }
 
-- 
2.12.1



More information about the vlc-devel mailing list