[MPlayer-dev-eng] [PATCH] First usable version of the new config system

Alban Bedel albeu at free.fr
Thu Oct 31 22:53:49 CET 2002


Hi Arpi,

on Wed, 30 Oct 2002 20:58:28 +0100 you wrote:

> Hi,
> 
> > Attached is a new version. The only 'big' remaining problem is with the
> what about -dvd, -loop etc?
This is fixed, but -dvd, -vcd and -tv on shouldn't be used in config files (as the
config file parser can't/musn't access the playlist). Anyway this should be fixed
in libmpdemux to use a single consitant way to open steams. (I vote for url like
name :). We could still keep the old -dvd, etc as they look better on the command
line ;)

> > x11 vo's
> > (see my mail $SUBJ = "Potential bug in x11 based drivers ??"). I have 2 way to
> > solve this : Add a flag to emulate the old config behaviour on some options
> > (do not reverse them to default unless there were an user setting) or fix
> i would prefer this
It's fine for me, anyway it's better to have a way to emulate the old behaviour some
other option may need it also. But it won't be more than a workaround for this case.

> > x11 vo's
> > to make sure that the needed vars are correctly set (wich would really
> > solve the
> > problem). I attached a patch that fix the fullscreen bug and -fixed-vo for xv.
> > Is it ok this way ?
> no!
> 
> the right fix would be the opt_ way, used at other places too.
> ie, make opt_screenwidth, opt_screenheight, and set them from cfgparser.
> then in vo layer init vo_screenwidth/vo_screenheight from that.

ok but that doesn't solve this case (where no config stuff take place, it just use libvo
as is) :

vo_x11->preinit() // Here vo_init() will be called and setup vo_screenwidth, etc
[....]
vo_x11->uninit()
evil_vo->preinit() // Evil vo set some other values in vo_screenwidth, etc
[...]
evil_vo->uninit()
vo_x11->init() // Here vo_uninit() isn't called hence vo_screenwidth, etc are invalid.
			// From now various bugs may appears like crash on fs switching

I want to stress that this call sequence is 100% valid with the libvo API so it must
work.

> don't mess with vo_init()
My point is that it's a libvo bug. vo_screenwidth, etc may be set to force some libvo
params, so i don't think that it must be up to the libvo user to save/restore this to
workaroud buggy libvo drivers. I propose the reverse way (see the hand made
patch), but i still prefer the recheck version, as the user may want to use another
xinerama screen for example.

libvo/x11_common.c: 
+static int x_screenwidth = 0;
[...]
int vo_init() {
[....]
-	if(vo_depthonscreen) return 1;
+	// Restore the saved values
+	if(vo_depthonscreen) {
+		vo_screenwidth = x_screenwidth;
+[...]
+		return 1;
+	}
[...]
+	// Save the global vars that may be used by other vo's
+	x_screenwidth = vo_screenwidth;
+[...]
	return 1;
}

	Albeu



More information about the MPlayer-dev-eng mailing list