Index: get_path.c =================================================================== --- get_path.c (revision 25844) +++ get_path.c (working copy) @@ -152,3 +152,16 @@ mp_msg(MSGT_WIN32, MSGL_WARN, "Cannot set PATH!"); } #endif /*WIN32 && USE_WIN32DLL*/ + +#ifdef WIN32_LOADER +#include "loader/driver.h" + +void set_codec_path( void ) +{ + char *codecs_dir; + + codecs_dir = getenv("MPLAYER_CODECS_DIR"); + if( codecs_dir ) + SetCodecPath( codecs_dir ); +} +#endif Index: get_path.h =================================================================== --- get_path.h (revision 25844) +++ get_path.h (working copy) @@ -24,4 +24,8 @@ char *get_path(const char *filename); void set_path_env(); +#ifdef WIN32_LOADER +void set_codec_path( void ); +#endif + #endif /* GET_PATH_H */ Index: mplayer.c =================================================================== @@ -2391,6 +2396,10 @@ set_path_env(); #endif /*WIN32 && USE_WIN32DLL*/ +#ifdef WIN32_LOADER + set_codec_path(); +#endif + #ifdef USE_TV stream_tv_defaults.immediate = 1; #endif Index: DOCS/man/en/mplayer.1 =================================================================== --- DOCS/man/en/mplayer.1 (revision 25844) +++ DOCS/man/en/mplayer.1 (working copy) @@ -10440,6 +10440,10 @@ The resulting verbosity corresponds to that of \-msglevel 5 plus the value of MPLAYER_VERBOSE. . +.TP +.B MPLAYER_CODECS_DIR +Directory where MPlayer looks for Win32 binary codecs. +. .SS libaf: . .TP