[MPlayer-cvslog] r34257 - in trunk: cfg-common.h cfg-mplayer.h m_option.c m_option.h

Ingo Brückl ib at wupperonline.de
Wed Oct 26 19:31:15 CEST 2011


reimar wrote on Tue, 25 Oct 2011 22:18:35 +0200 (CEST):

> Author: reimar
> Date: Tue Oct 25 22:18:35 2011
> New Revision: 34257

> Log:
> Sanitize include behaviour.

> The normal func_param argument type will iterate over all previous
> values each time a new value is assigned.
> This leads e.g. to a complete mess and non-working recursion limiting
> when creating a config file that includes itself.
> Seem to also fix bug #1994.

> Modified:
>    trunk/cfg-common.h
>    trunk/cfg-mplayer.h
>    trunk/m_option.c
>    trunk/m_option.h

> Modified: trunk/cfg-mplayer.h
> ==============================================================================
> +++ trunk/cfg-mplayer.h Tue Oct 25 22:18:35 2011        (r34257)
> @@ -301,7 +301,7 @@ const m_option_t mplayer_opts[]={
>      {"noenqueue", &enqueue, CONF_TYPE_FLAG, 0, 1, 0, NULL},
>      {"guiwid", "-guiwid has been removed, use -gui-wid instead.\n",
> CONF_TYPE_PRINT, 0, 0, 0, NULL},
>      {"gui-wid", &guiWinID, CONF_TYPE_INT, 0, 0, 0, NULL},
> -    {"gui-include", cfg_gui_include, CONF_TYPE_FUNC_PARAM, CONF_NOSAVE, 0, 0, NULL},
> +    {"gui-include", cfg_gui_include, CONF_TYPE_FUNC_PARAM_IMMEDIATE, CONF_NOSAVE, 0, 0, NULL},

This segfaults the GUI.

If I understand CONF_TYPE_FUNC_PARAM_IMMEDIATE correctly, this isn't the
desired behaviour either.

Option gui-include is meant to override the gui.conf settings. In order to do
this, MPlayer must have called cfg_read() where gui.conf is read and
m_config_t *gui_conf is set. CONF_TYPE_FUNC_PARAM_IMMEDIATE seems to act
prior to this, thus gui_conf still is NULL.

As the GUI's config files don't allow includes anyway, it seems save to stay
with CONF_TYPE_FUNC_PARAM.

Ingo


More information about the MPlayer-cvslog mailing list