[MPlayer-users] solved: wrong aspect ratio with xv driver

Nilmoni Deb ndeb at ece.cmu.edu
Tue Mar 5 20:10:02 CET 2002


  
Hi all,
	This is a followup of my post in

http://mplayerhq.hu/pipermail/mplayer-users/2002-March/011747.html

The following is a portion (see line numbers on the left) of
libvo/vo_xv.c .

    497 #ifdef HAVE_NEW_GUI
    498       if ( vo_window != None )
    499        {
    500         printf("mFullscreen=%d flags=%d vo_window=%d\n",mFullscreen,flag        s,vo_window);
    501         mFullscreen=0;
    502         dwidth=mdwidth; dheight=mdheight;
    503         if ( ( vo_dwidth == vo_screenwidth )&&( vo_dheight == vo_screenh        eight ) )
    504          {
    505           mFullscreen=1;
    506           dwidth=vo_screenwidth;
    507           dheight=vo_screenwidth * mdheight / mdwidth;
    508          }
    509        }
    510 #endif

I have added line 500 for debugging. The output of that is:

mFullscreen=1 flags=1 vo_window=4194305

which shows the correct value of mFullscreen for the xv driver with "-fs"
option. The part where it goes wrong is in line 501. Since I compiled with
gui enabled, this ifdef is active. But I am *not* running mplayer with gui
('mplayer -gui') which means this ifdef block should not be executed
in this case.

The solution is to check if the gui window has been created and use that
as a check. In short the line:

    498       if ( vo_window != None )

should be replaced by something like:

    498       if ( vo_window != None && gui_window != None)

where gui_window is the window of the gui interface (I don't know what the
exact name of that variable is so I can't call it a patch yet).

I did a quick hack (commented line 501) and the problem of wrong aspect
ratio with xv driver in fullscreen mode immediately vanished. This proves
the problem is somewhere there.

thanks
- Nil




More information about the MPlayer-users mailing list