diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index e2df09d996..d118f43ae4 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -754,6 +754,10 @@ Using realtime priority can cause system lockup. .RE . .TP +.B \-codecpath +Specify a directory for binary codecs. +. +.TP .B \-profile Use the given profile(s), \-profile help displays a list of the defined profiles. . diff --git a/cfg-common-opts.h b/cfg-common-opts.h index 1bdbca4735..7c85e8885a 100644 --- a/cfg-common-opts.h +++ b/cfg-common-opts.h @@ -39,6 +39,9 @@ {"include", cfg_include, CONF_TYPE_FUNC_PARAM, CONF_NOSAVE, 0, 0, NULL}, #ifdef CONFIG_PRIORITY {"priority", &proc_priority, CONF_TYPE_STRING, 0, 0, 0, NULL}, +#endif +#ifdef CONFIG_WIN32DLL + {"codecpath", &codec_path, CONF_TYPE_STRING, 0, 0, 0, NULL}, #endif {"noconfig", noconfig_opts, CONF_TYPE_SUBCONFIG, CONF_GLOBAL|CONF_NOCFG|CONF_PRE_PARSE, 0, 0, NULL}, diff --git a/get_path.h b/get_path.h index 2f1909b601..759356e527 100644 --- a/get_path.h +++ b/get_path.h @@ -24,4 +24,10 @@ char *get_path(const char *filename); void set_path_env(void); +#ifdef CONFIG_WIN32DLL +extern void SetCodecPath(const char *); // in loader/drv.c + +static char *codec_path=NULL; +#endif + #endif /* MPLAYER_GET_PATH_H */ diff --git a/mencoder.c b/mencoder.c index 7b9f5705eb..12467cccfc 100644 --- a/mencoder.c +++ b/mencoder.c @@ -534,6 +534,11 @@ if (frameno_filename) { set_priority(); #endif +#ifdef CONFIG_WIN32DLL + if (codec_path) + SetCodecPath(codec_path); +#endif + // check font #ifdef CONFIG_FREETYPE init_freetype(); diff --git a/mplayer.c b/mplayer.c index a5fe132d0a..77400a0ed0 100644 --- a/mplayer.c +++ b/mplayer.c @@ -2701,6 +2701,11 @@ int gui_no_filename=0; set_priority(); #endif +#ifdef CONFIG_WIN32DLL + if (codec_path) + SetCodecPath(codec_path); +#endif + #ifndef CONFIG_GUI if(use_gui){ mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_NoGui);