# HG changeset patch # User komh # Date 1268641806 0 # Node ID 977fd535cc9dfc3d89a0c135999697ec28dafd5c # Parent 0651155480a590eeaf28631a74a1830584928af6 Add -codecpath option. It allows to search binary codecs in non-standard directories. diff -r 0651155480a5 -r 977fd535cc9d DOCS/man/en/mplayer.1 --- a/DOCS/man/en/mplayer.1 Mon Mar 15 06:39:21 2010 +0000 +++ b/DOCS/man/en/mplayer.1 Mon Mar 15 08:30:06 2010 +0000 @@ -754,6 +754,10 @@ .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 -r 0651155480a5 -r 977fd535cc9d cfg-common-opts.h --- a/cfg-common-opts.h Mon Mar 15 06:39:21 2010 +0000 +++ b/cfg-common-opts.h Mon Mar 15 08:30:06 2010 +0000 @@ -40,6 +40,9 @@ #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}, // ------------------------- stream options -------------------- diff -r 0651155480a5 -r 977fd535cc9d get_path.h --- a/get_path.h Mon Mar 15 06:39:21 2010 +0000 +++ b/get_path.h Mon Mar 15 08:30:06 2010 +0000 @@ -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 -r 0651155480a5 -r 977fd535cc9d mencoder.c --- a/mencoder.c Mon Mar 15 06:39:21 2010 +0000 +++ b/mencoder.c Mon Mar 15 08:30:06 2010 +0000 @@ -534,6 +534,11 @@ set_priority(); #endif +#ifdef CONFIG_WIN32DLL + if (codec_path) + SetCodecPath(codec_path); +#endif + // check font #ifdef CONFIG_FREETYPE init_freetype(); diff -r 0651155480a5 -r 977fd535cc9d mplayer.c --- a/mplayer.c Mon Mar 15 06:39:21 2010 +0000 +++ b/mplayer.c Mon Mar 15 08:30:06 2010 +0000 @@ -2701,6 +2701,11 @@ 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);