summaryrefslogtreecommitdiffstats
path: root/player/javascript.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/javascript.c')
-rw-r--r--player/javascript.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/player/javascript.c b/player/javascript.c
index ec14582575..60777baecf 100644
--- a/player/javascript.c
+++ b/player/javascript.c
@@ -535,8 +535,7 @@ static int s_load_javascript(struct mp_script_args *args)
js_Alloc alloc_fn = NULL;
void *actx = NULL;
- char *mem_report = getenv("MPV_LEAK_REPORT");
- if (mem_report && strcmp(mem_report, "1") == 0) {
+ if (args->mpctx->opts->js_memory_report) {
alloc_fn = mp_js_alloc;
actx = ctx;
}