summaryrefslogtreecommitdiffstats
path: root/player/main.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-05-02 19:03:28 +0200
committerwm4 <wm4@nowhere>2015-05-02 19:03:28 +0200
commit1982fedca61b9b7c4bec2e6f2d31ee566fb51923 (patch)
tree0d8df152ef39930d4904f8707b1b124f43765581 /player/main.c
parent3508a3fbd12b93e0414acb7996417dd91f369170 (diff)
downloadmpv-1982fedca61b9b7c4bec2e6f2d31ee566fb51923.tar.bz2
mpv-1982fedca61b9b7c4bec2e6f2d31ee566fb51923.tar.xz
options: remove --leak-report
Use the environment variable instead.
Diffstat (limited to 'player/main.c')
-rw-r--r--player/main.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/player/main.c b/player/main.c
index dc5c901447..ff7450f164 100644
--- a/player/main.c
+++ b/player/main.c
@@ -272,16 +272,6 @@ static bool handle_help_options(struct MPContext *mpctx)
return opt_exit;
}
-static void osdep_preinit(int argc, char **argv)
-{
- char *enable_talloc = getenv("MPV_LEAK_REPORT");
- if (argc > 1 && (strcmp(argv[1], "-leak-report") == 0 ||
- strcmp(argv[1], "--leak-report") == 0))
- enable_talloc = "1";
- if (enable_talloc && strcmp(enable_talloc, "1") == 0)
- talloc_enable_leak_report();
-}
-
static int cfg_include(void *ctx, char *filename, int flags)
{
struct MPContext *mpctx = ctx;
@@ -486,7 +476,9 @@ int mp_initialize(struct MPContext *mpctx, char **options)
int mpv_main(int argc, char *argv[])
{
- osdep_preinit(argc, argv);
+ char *enable_talloc = getenv("MPV_LEAK_REPORT");
+ if (enable_talloc && strcmp(enable_talloc, "1") == 0)
+ talloc_enable_leak_report();
struct MPContext *mpctx = mp_create();
struct MPOpts *opts = mpctx->opts;