Re: Re: About final cfg.h (config layer 0 discussion)

Arpi <[email protected]>
Newsgroups gmane.comp.video.mplayer.g2.devel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.