[vlc-devel] [PATCH] respect the x,y offset in Direct2D

Steve Lhomme robUx4 at videolabs.io
Thu Mar 5 12:57:46 CET 2015


---
 modules/video_output/msw/direct2d.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/msw/direct2d.c b/modules/video_output/msw/direct2d.c
index f612262..6740a26 100644
--- a/modules/video_output/msw/direct2d.c
+++ b/modules/video_output/msw/direct2d.c
@@ -213,7 +213,9 @@ static void Prepare(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
 
         HRESULT hr = ID2D1Bitmap_CopyFromMemory(sys->d2_bitmap,
                                                 NULL /*&r_src*/,
-                                                picture->p[0].p_pixels,
+                                                picture->p[0].p_pixels +
+                                                picture->format.i_y_offset * picture->p[0].i_pitch +
+                                                picture->format.i_x_offset * picture->p[0].i_pixel_pitch,
                                                 picture->p[0].i_pitch);
         if (hr != S_OK)
             msg_Err(vd, "Failed to copy bitmap memory (hr = 0x%x)!",
-- 
2.2.2




More information about the vlc-devel mailing list