# HG changeset patch # User faust3 # Date 1040299310 0 # Node ID a23489e72ef0be0a38ed982cf38563ecbfc6cb47 # Parent 47cf9405813701d2f285274ce8ae6ecb9c7116c2 10l - my system is very tolerant it seems diff -r 47cf94058137 -r a23489e72ef0 libvo/vo_directx.c --- a/libvo/vo_directx.c Thu Dec 19 10:09:43 2002 +0000 +++ b/libvo/vo_directx.c Thu Dec 19 12:01:50 2002 +0000 @@ -118,13 +118,13 @@ case IMGFMT_I420 : case IMGFMT_IYUV : case IMGFMT_YVU9 : - vo_draw_alpha_yv12(w,h,src,srca,stride,((uint8_t *) image) + image_width*y0 + x0,image_width); + vo_draw_alpha_yv12(w,h,src,srca,stride,((uint8_t *) image) + dstride*y0 + x0,dstride); break; case IMGFMT_YUY2 : - vo_draw_alpha_yuy2(w,h,src,srca,stride,((uint8_t *) image)+ 2*image_width*y0 + 2*x0 ,2*image_width); + vo_draw_alpha_yuy2(w,h,src,srca,stride,((uint8_t *) image)+ dstride*y0 + 2*x0 ,dstride); break; case IMGFMT_UYVY : - vo_draw_alpha_yuy2(w,h,src,srca,stride,((uint8_t *) image) + 2*image_width*y0 + 2*x0 + 1,dstride); + vo_draw_alpha_yuy2(w,h,src,srca,stride,((uint8_t *) image) + dstride*y0 + 2*x0 + 1,dstride); break; case IMGFMT_RGB15: case IMGFMT_BGR15: @@ -1047,11 +1047,8 @@ } if(dxresult != DD_OK)mp_msg(MSGT_VO, MSGL_ERR,"can't flip page\n"); } - g_lpddsBack->lpVtbl->Lock(g_lpddsBack,NULL,&ddsdsf, DDLOCK_NOSYSLOCK | DDLOCK_WAIT , NULL); g_lpddsBack->lpVtbl->Unlock (g_lpddsBack,NULL); - dstride = ddsdsf.lPitch; - image = ddsdsf.lpSurface; - if(nooverlay == 1) + if(nooverlay) { DDBLTFX ddbltfx; // ask for the "NOTEARING" option @@ -1060,6 +1057,9 @@ ddbltfx.dwDDFX = DDBLTFX_NOTEARING; g_lpddsPrimary->lpVtbl->Blt(g_lpddsPrimary, &rd, g_lpddsBack, NULL, DDBLT_WAIT, &ddbltfx); } + g_lpddsBack->lpVtbl->Lock(g_lpddsBack,NULL,&ddsdsf, DDLOCK_NOSYSLOCK | DDLOCK_WAIT , NULL); + dstride = ddsdsf.lPitch; + image = ddsdsf.lpSurface; } static uint32_t draw_frame(uint8_t *src[]) @@ -1241,7 +1241,6 @@ memset(&ddsdsf, 0,sizeof(DDSURFACEDESC)); ddsdsf.dwSize = sizeof (DDSURFACEDESC); g_lpddsBack->lpVtbl->Lock(g_lpddsBack,NULL,&ddsdsf, DDLOCK_NOSYSLOCK | DDLOCK_WAIT, NULL); - g_lpddsBack->lpVtbl->Unlock (g_lpddsBack,NULL); dstride = ddsdsf.lPitch; image = ddsdsf.lpSurface; if(image_format==IMGFMT_I420||image_format==IMGFMT_IYUV)