[MPlayer-users] [PATCH] xvidix set_window() bug

Attila Kinali kinali at gmx.net
Sat Jun 1 18:29:01 CEST 2002


Hi,

I found yesterday that set_window() of xvidix has a bug that prevents
it from changing the position of the colour mask:
The detection of a changement of the window isnt correctly done
as when set_window() is called vo_dx is equal to drwcX and vo_dy to drwcY
and so on.

I just changed the one call of set_window() with force_updat=0 to 1.
I left the debug msgs i adedd in the patch as they may help finding
why this part of the code fails


Greetings
		Attilia Kinali
-------------- next part --------------
--- main/libvo/vo_xvidix.c	Wed May 15 22:40:21 2002
+++ xvidix/libvo/vo_xvidix.c	Fri May 31 18:04:36 2002
@@ -73,9 +73,12 @@
 static uint32_t drwX, drwY, drwWidth, drwHeight, drwBorderWidth,
     drwDepth, drwcX, drwcY, dwidth, dheight;
 
+#warning FIXME: force_update doesnt work as vo_dx==drwcX ...
 static void set_window(int force_update,const vo_tune_info_t *info)
 {
     Window mRoot;
+    mp_msg(MSGT_VO, MSGL_DBG2,"\nset_window: entrance\nvo_dx:\t%d vo_dy:\t%d window_width:\t%d window_height:\t%d\ndrwcX:\t%d drwcY:\t%d drwWidth:    \t%d drwHeight:  \t%d\n",
+    vo_dx,vo_dy,window_width,window_height,drwcX,drwcY,drwWidth,drwHeight);
     if ( WinID )
      {
       XGetGeometry(mDisplay, vo_window, &mRoot, &drwX, &drwY, &drwWidth,
@@ -111,6 +114,8 @@
 	    drwcX, drwcY, drwX, drwY, drwWidth, drwHeight);
     }
 #endif
+    mp_msg(MSGT_VO, MSGL_DBG2,"set_window: after aspect\nvo_dx:\t%d vo_dy:\t%d window_width:\t%d window_height:\t%d\ndrwcX:\t%d drwcY:\t%d drwWidth:    \t%d drwHeight:  \t%d\n",
+    vo_dx,vo_dy,window_width,window_height,drwcX,drwcY,drwWidth,drwHeight);
 
 #ifdef HAVE_XINERAMA
     if (XineramaIsActive(mDisplay))
@@ -135,6 +140,8 @@
 #endif
 
     /* set new values in VIDIX */
+    mp_msg(MSGT_VO, MSGL_V,"set_window: before setting\nvo_dx:\t%d vo_dy:\t%d window_width:\t%d window_height:\t%d\ndrwcX:\t%d drwcY:\t%d drwWidth:    \t%d drwHeight:  \t%d\n",
+    vo_dx,vo_dy,window_width,window_height,drwcX,drwcY,drwWidth,drwHeight);
     if (force_update || (vo_dx != drwcX) || (vo_dy != drwcY) ||
 	(window_width != drwWidth) || (window_height != drwHeight))
     {
@@ -366,7 +373,7 @@
     const int event = vo_x11_check_events(mDisplay);
 
     if ((event & VO_EVENT_RESIZE) || (event & VO_EVENT_EXPOSE))
-	set_window(0,&vtune);
+	set_window(1,&vtune);
 
     return;
 }


More information about the MPlayer-users mailing list