summaryrefslogtreecommitdiffstats
path: root/core/mplayer.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-11-20 13:31:56 +0100
committerwm4 <wm4@nowhere>2012-11-20 18:00:15 +0100
commit77a77d886978a87ab2ff8f68da553d4b34b5d48b (patch)
treeba374a6e415759cd3c9704a481ef45184c971b71 /core/mplayer.c
parent3d41fb8e485a181cbe53ef13eb4160acab16c216 (diff)
downloadmpv-77a77d886978a87ab2ff8f68da553d4b34b5d48b.tar.bz2
mpv-77a77d886978a87ab2ff8f68da553d4b34b5d48b.tar.xz
mplayer: disable auto-loading of external codecs.conf
Do not load codecs.conf files located in $PREFIX/etc/mpv/ or ~/.mpv/. There really is no use for this, other than possibly breaking things. It's still possible to use --codecs-file explicitly to load an external config file, and this option can be used in ~/.mpv/config. While we're at it, remove the global codecs_file variable, and another unused variable.
Diffstat (limited to 'core/mplayer.c')
-rw-r--r--core/mplayer.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/core/mplayer.c b/core/mplayer.c
index 6ad6365850..ebe6d8f9db 100644
--- a/core/mplayer.c
+++ b/core/mplayer.c
@@ -4252,19 +4252,10 @@ static bool handle_help_options(struct MPContext *mpctx)
static bool load_codecs_conf(struct MPContext *mpctx)
{
/* Check codecs.conf. */
- if (!codecs_file || !parse_codec_cfg(codecs_file)) {
- char *mem_ptr;
- if (!parse_codec_cfg(mem_ptr = get_path("codecs.conf"))) {
- if (!parse_codec_cfg(MPLAYER_CONFDIR "/codecs.conf")) {
- if (!parse_codec_cfg(NULL))
- return false;
- mp_tmsg(MSGT_CPLAYER, MSGL_V,
- "Using built-in default codecs.conf.\n");
- }
- }
- free(mem_ptr); // release the buffer created by get_path()
- }
- return true;
+ if (mpctx->opts.codecs_file && parse_codec_cfg(mpctx->opts.codecs_file))
+ return true;
+ mp_tmsg(MSGT_CPLAYER, MSGL_V, "Using built-in default codecs.conf.\n");
+ return parse_codec_cfg(NULL);
}
#ifdef PTW32_STATIC_LIB