[vlc-commits] direct3d11: update the quad position using the picture placing algorithm

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


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

direct3d11: update the quad position using the picture placing algorithm

When the decoder uses a different size than what was configured in the pool.

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

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

 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);
         }
     }
 



More information about the vlc-commits mailing list