[vlc-commits] d3d11va: use the internal surface size after the alignment has been applied

Steve Lhomme git at videolan.org
Sun Dec 17 23:18:13 CET 2017


vlc/vlc-3.0 | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Wed Dec 13 16:33:37 2017 +0100| [069d0590465976c81b1fda5ca359c79347061b0e] | committer: Jean-Baptiste Kempf

d3d11va: use the internal surface size after the alignment has been applied

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit b697e5618bf341b27a065f9bdefeab78db7ae7dd)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/codec/avcodec/d3d11va.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 333cd641f5..fb5bb22c31 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -368,11 +368,6 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
             va->sys->totalTextureSlices = dstDesc.ArraySize;
         }
     }
-    if (!va->sys->textureWidth || !va->sys->textureHeight)
-    {
-        va->sys->textureWidth  = fmt->video.i_width;
-        va->sys->textureHeight = fmt->video.i_height;
-    }
 
     err = D3D11_Create( va, &sys->hd3d );
     if (err != VLC_SUCCESS)
@@ -685,6 +680,12 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id,
         ID3D10Multithread_Release(pMultithread);
     }
 
+    if (!sys->textureWidth || !sys->textureHeight)
+    {
+        sys->textureWidth  = fmt->i_width;
+        sys->textureHeight = fmt->i_height;
+    }
+
 #if VLC_WINSTORE_APP
     /* On the Xbox 1/S, any decoding of H264 with one dimension over 2304
      * crashes totally the device */



More information about the vlc-commits mailing list