summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cfg-mplayer.h1
-rw-r--r--m_option.c2
-rw-r--r--mplayer.c3
3 files changed, 4 insertions, 2 deletions
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},
diff --git a/m_option.c b/m_option.c
index a0f01e6344..3cca348b1e 100644
--- a/m_option.c
+++ b/m_option.c
@@ -970,7 +970,7 @@ static int parse_print(const m_option_t* opt,const char *name, const char *param
if(opt->priv == NULL)
return M_OPT_EXIT;
- return 1;
+ return 0;
}
const m_option_type_t m_option_type_print = {
diff --git a/mplayer.c b/mplayer.c
index 382fe2a6f5..59ce629300 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -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;