[MPlayer-cvslog] CVS: main/libvo vo_xvmc.c,1.15,1.16
Ivan Kalvachev CVS
syncmail at mplayerhq.hu
Thu Apr 7 18:59:37 CEST 2005
CVS change done by Ivan Kalvachev CVS
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv21289
Modified Files:
vo_xvmc.c
Log Message:
fix blackscreen when changing panscan.
Index: vo_xvmc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xvmc.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- vo_xvmc.c 20 Feb 2005 22:43:25 -0000 1.15
+++ vo_xvmc.c 7 Apr 2005 16:59:34 -0000 1.16
@@ -996,16 +996,33 @@
XvMCSyncSurface(mDisplay, srf);
}
-static void flip_page(void){
+static void put_xvmc_image(xvmc_render_state_t * p_render_surface){
int rez;
int clipX,clipY,clipW,clipH;
-int i,cfs;
+
+ if(p_render_surface == NULL)
+ return;
clipX = drwX-(vo_panscan_x>>1);
clipY = drwY-(vo_panscan_y>>1);
clipW = vo_dwidth+vo_panscan_x;
clipH = vo_dheight+vo_panscan_y;
+ rez = XvMCPutSurface(mDisplay, p_render_surface->p_surface,
+ vo_window,
+ 0, 0, image_width, image_height,
+ clipX, clipY, clipW, clipH,
+ 3);//p_render_surface_to_show->display_flags);
+ if(rez != Success){
+ printf("vo_xvmc: PutSurface failer, critical error!\n");
+ assert(0);
+ }
+}
+
+static void flip_page(void){
+int i,cfs;
+
+
if( verbose > 3 )
printf("vo_xvmc: flip_page show(rndr=%p)\n\n",p_render_surface_to_show);
@@ -1044,15 +1061,7 @@
//show it, displaying is always vsynced, so skip it for benchmark
if(!benchmark){
- rez = XvMCPutSurface(mDisplay, p_render_surface_to_show->p_surface,
- vo_window,
- 0, 0, image_width, image_height,
- clipX, clipY, clipW, clipH,
- 3);//p_render_surface_to_show->display_flags);
- if(rez != Success){
- printf("vo_xvmc: PutSurface failer, critical error!\n");
- assert(0);
- }
+ put_xvmc_image(p_render_surface_to_show);
}
p_render_surface_visible = p_render_surface_to_show;
@@ -1089,11 +1098,7 @@
if ( e & VO_EVENT_EXPOSE )
{
vo_xv_draw_colorkey(drwX,drwY,vo_dwidth,vo_dheight);
- if(p_render_surface_visible != NULL)
- XvMCPutSurface(mDisplay, p_render_surface_visible->p_surface,vo_window,
- 0, 0, image_width, image_height,
- drwX,drwY,vo_dwidth,vo_dheight,
- 3);//,p_render_surface_visible->display_flags);!!
+ put_xvmc_image(p_render_surface_visible);
}
}
@@ -1365,8 +1370,11 @@
if(old_y != vo_panscan_y)
{
- XClearWindow(mDisplay, vo_window);
- XFlush(mDisplay);
+ vo_x11_clearwindow_part(mDisplay, vo_window,
+ vo_dwidth + vo_panscan_x - 1,
+ vo_dheight + vo_panscan_y - 1,
+ 1);
+ put_xvmc_image(p_render_surface_visible);
}
}
return VO_TRUE;
More information about the MPlayer-cvslog
mailing list