direct3d11: update the quad position using the picture placing algorithm
authorSteve Lhomme <robUx4@videolabs.io>
Thu, 27 Jul 2017 15:46:09 +0000 (17:46 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 27 Jul 2017 16:29:07 +0000 (18:29 +0200)
When the decoder uses a different size than what was configured in the pool.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/video_output/win32/direct3d11.c

index a68f67a..05b1360 100644 (file)
@@ -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);
         }
     }