Commit 1772a146 authored by Laurent Aimar's avatar Laurent Aimar

Fixed rendering of subpictures with non 0 offset in direct3d.

It is needed for DVD menu support.
parent 446263ea
......@@ -1256,7 +1256,9 @@ static void Direct3DImportSubpicture(vout_display_t *vd,
if (SUCCEEDED(hr)) {
uint8_t *dst_data = lock.pBits;
int dst_pitch = lock.Pitch;
uint8_t *src_data = r->p_picture->p->p_pixels;
const int src_offset = r->fmt.i_y_offset * r->p_picture->p->i_pitch +
r->fmt.i_x_offset * r->p_picture->p->i_pixel_pitch;
uint8_t *src_data = &r->p_picture->p->p_pixels[src_offset];
int src_pitch = r->p_picture->p->i_pitch;
for (unsigned y = 0; y < r->fmt.i_visible_height; y++) {
int copy_pitch = __MIN(dst_pitch, r->p_picture->p->i_visible_pitch);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment