diff options
author | wm4 <wm4@nowhere> | 2013-12-21 19:27:19 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-21 20:50:13 +0100 |
commit | dadf3a9a46d31a101aeaa1256b0d6f914eb32f1e (patch) | |
tree | ff77fc71275281769ce559dd7e8fd9b180f02213 /player | |
parent | 3846fc758789711347c0b11f87736b27fc6210a0 (diff) | |
download | mpv-dadf3a9a46d31a101aeaa1256b0d6f914eb32f1e.tar.bz2 mpv-dadf3a9a46d31a101aeaa1256b0d6f914eb32f1e.tar.xz |
m_config: add custom context to includefunc callback
Diffstat (limited to 'player')
-rw-r--r-- | player/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/player/main.c b/player/main.c index 7ca64ed664..3dde2f6101 100644 --- a/player/main.c +++ b/player/main.c @@ -292,9 +292,10 @@ static void init_input(struct MPContext *mpctx) #endif } -static int cfg_include(struct m_config *conf, char *filename, int flags) +static int cfg_include(void *ctx, char *filename, int flags) { - return m_config_parse_config_file(conf, filename, flags); + struct MPContext *mpctx = ctx; + return m_config_parse_config_file(mpctx->mconfig, filename, flags); } static int mpv_main(int argc, char *argv[]) @@ -318,6 +319,7 @@ static int mpv_main(int argc, char *argv[]) &mp_default_opts, mp_opts); mpctx->opts = mpctx->mconfig->optstruct; mpctx->mconfig->includefunc = cfg_include; + mpctx->mconfig->includefunc_ctx = mpctx; mpctx->mconfig->use_profiles = true; mpctx->mconfig->is_toplevel = true; |