[MPlayer-G2-dev] Re: About final cfg.h (config layer 0 discussion)

Arpi arpi at thot.banki.hu
Mon May 26 16:34:10 CEST 2003


Hi,

> This is total nonsense since some of vf->cfg may be pointers to other
> dynamically allocated stuff. With all this confusion about who will
> allocate, free, and update what, you're bound to create memory leaks.
> 
> IMO you should just let the program modify vf->cfg directly. If the
> module needs an untouchable copy of the 'current value' of some param
> to use when deciding whether a runtime change it allowed, it should
> make its own copy of the data in vf->priv. Otherwise it should expect
> the program to call VFCTRL_SET_PARAMS immediately after changing
> vf->cfg.

100% agree.

btw, unless an option is flagged as runtime-changeable, it must not be
modified after module initialization, by the caller.

also, app may (and should) change values at init and VFCTRL_SET_PARAMS
control, when they are not acceptable (for example the crop filter gets
x+w>orig_w) so the caller will know the final (used) values.


A'rpi / Astral & ESP-team

--
Developer of MPlayer G2, the Movie Framework for all - http://www.MPlayerHQ.hu



More information about the MPlayer-G2-dev mailing list