vlc | branch: master | Steve Lhomme <[email protected]> | Tue May 23 13:47:08 
2017 +0200| [0e5657f93e7c64097eab675710da129cba6f5319] | committer: 
Jean-Baptiste Kempf

d3d11_surface: no matter what the texture height is given by the texture 
description

Signed-off-by: Jean-Baptiste Kempf <[email protected]>

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

 modules/video_chroma/d3d11_surface.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/video_chroma/d3d11_surface.c 
b/modules/video_chroma/d3d11_surface.c
index 929e3b9ac3..26196f7385 100644
--- a/modules/video_chroma/d3d11_surface.c
+++ b/modules/video_chroma/d3d11_surface.c
@@ -144,9 +144,9 @@ static void D3D11_YUY2(filter_t *p_filter, picture_t *src, 
picture_t *dst)
 
         uint8_t *plane[3] = {
             (uint8_t*)lock.pData,
-            (uint8_t*)lock.pData + pitch[0] * src->format.i_height,
-            (uint8_t*)lock.pData + pitch[0] * src->format.i_height
-                                 + pitch[1] * src->format.i_height / 2,
+            (uint8_t*)lock.pData + pitch[0] * desc.Height,
+            (uint8_t*)lock.pData + pitch[0] * desc.Height
+                                 + pitch[1] * desc.Height / 2,
         };
 
         CopyFromYv12ToYv12(dst, plane, pitch,
@@ -154,7 +154,7 @@ static void D3D11_YUY2(filter_t *p_filter, picture_t *src, 
picture_t *dst)
     } else if (desc.Format == DXGI_FORMAT_NV12) {
         uint8_t *plane[2] = {
             lock.pData,
-            (uint8_t*)lock.pData + lock.RowPitch * src->format.i_height
+            (uint8_t*)lock.pData + lock.RowPitch * desc.Height
         };
         size_t  pitch[2] = {
             lock.RowPitch,
@@ -214,7 +214,7 @@ static void D3D11_NV12(filter_t *p_filter, picture_t *src, 
picture_t *dst)
     if (desc.Format == DXGI_FORMAT_NV12) {
         uint8_t *plane[2] = {
             lock.pData,
-            (uint8_t*)lock.pData + lock.RowPitch * src->format.i_height
+            (uint8_t*)lock.pData + lock.RowPitch * desc.Height
         };
         size_t  pitch[2] = {
             lock.RowPitch,

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to