[MPlayer-dev-eng] Fwd: solved: wrong aspect ratio with xv driver (fwd)

Felix Buenemann Felix.Buenemann at gmx.de
Wed Mar 6 01:21:13 CET 2002


----------  Forwarded Message  ----------

Subject: solved: wrong aspect ratio with xv driver (fwd)
Date: Tue, 5 Mar 2002 12:36:04 -0500 (EST)
From: Nilmoni Deb <ndeb at ece.cmu.edu>
To: Felix Bnemann <removed private email>

Hi Felix,
	I tried to post this to the list but it hasn't appeared there yet.
Is something wrong with the mail server ?

thanks
- Nil

---------- Forwarded message ----------
Date: Tue, 5 Mar 2002 11:40:56 -0500 (EST)
From: Nilmoni Deb <ndeb at ece.cmu.edu>
To: mplayer-users at mplayerhq.hu
Subject: solved: wrong aspect ratio with xv driver


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

-------------------------------------------------------

-- 
MfG,
  Felix



More information about the MPlayer-dev-eng mailing list