[MPlayer-dev-eng] Re: XV page flipping synchronization

Piotr Neuman sikkh at wp.pl
Sun Mar 14 17:08:59 CET 2004


Here's the patch (mplayer-cvs-XFlush.patch):

Index: vo_xv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v
retrieving revision 1.151
diff -u -r1.151 vo_xv.c
--- vo_xv.c	30 Nov 2003 16:36:10 -0000	1.151
+++ vo_xv.c	14 Mar 2004 15:31:33 -0000
@@ -273,7 +273,6 @@
     
     if ( vo_gc != None ) XFreeGC( mDisplay,vo_gc );
     vo_gc = XCreateGC(mDisplay, vo_window, 0L, &xgcv);
-    XFlush(mDisplay);
     XSync(mDisplay, False);
 #ifdef HAVE_XF86VM
     if ( vm )
@@ -403,8 +402,7 @@
    free(xvimage[foo]->data);
   }
  XFree(xvimage[foo]);
- 
- XFlush( mDisplay );
+
  XSync(mDisplay, False);
  return;
 }
@@ -465,11 +463,9 @@
          0, 0,  image_width, image_height,
          
drwX-(vo_panscan_x>>1),drwY-(vo_panscan_y>>1),vo_dwidth+vo_panscan_x,(vo_fs?vo_dheight 
- 1:vo_dheight)+vo_panscan_y);
   }
- if (num_buffers>1){
+ if (num_buffers>1)
     current_buf=vo_directrendering?0:((current_buf+1)%num_buffers);
-    XFlush(mDisplay);
- } else
-    XSync(mDisplay, False);   
+ XSync(mDisplay, False);
  return;
 }
 




More information about the MPlayer-dev-eng mailing list