diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2011-01-15 22:26:27 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2011-01-15 22:36:27 +0200 |
commit | 8636eb77c5f9f1e49a12e3e1653fe4c2e8e0bfc3 (patch) | |
tree | 38e5b66ffed2e90cd93109977bc2cd937fa0c90f /mplayer.c | |
parent | ac79632ded16b62e0abf10f1cd319fba20bc0024 (diff) | |
download | mpv-8636eb77c5f9f1e49a12e3e1653fe4c2e8e0bfc3.tar.bz2 mpv-8636eb77c5f9f1e49a12e3e1653fe4c2e8e0bfc3.tar.xz |
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.
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -3871,7 +3871,8 @@ if (HAVE_CMOV) * file for some tools to link against. */ #ifndef DISABLE_MAIN int main(int argc,char* argv[]){ - + if (argc > 1 && !strcmp(argv[1], "-leak-report")) + talloc_enable_leak_report(); char * mem_ptr; |