From 8636eb77c5f9f1e49a12e3e1653fe4c2e8e0bfc3 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sat, 15 Jan 2011 22:26:27 +0200 Subject: options: add special -leak-report option Add a special option "-leak-report" that enables talloc leak reporting. It only works if it's given as the first argument. The code abuses the CONF_TYPE_PRINT option type to make main option parsing ignore the option. The parser incorrectly consumed the following commandline argument as a "parameter" for options of this type when they had the flag to not exit after printing the message. Fix this. It makes no difference for any previously existing option I think. --- cfg-mplayer.h | 1 + 1 file changed, 1 insertion(+) (limited to 'cfg-mplayer.h') diff --git a/cfg-mplayer.h b/cfg-mplayer.h index 7f0ee1f729..8b69908c7f 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -296,6 +296,7 @@ const m_option_t mplayer_opts[]={ {"lircconf", &lirc_configfile, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL}, #endif + {"leak-report", "", CONF_TYPE_PRINT, 0, 0, 0, (void*)1}, // these should be removed when gmplayer is forgotten {"gui", "Internal GUI was removed. Use some other frontend instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, {"nogui", "Internal GUI was removed, -nogui is no longer valid.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL}, -- cgit v1.2.3