[MPlayer-dev-eng] [PATCH] Win32 codec paths in vd_realvid.c

Diego Biurrun diego at biurrun.de
Sat Jun 28 20:51:02 CEST 2003


Glyn Kennington wrote:

> This might be a bug, or I might have misunderstood the codec loader.  Shout
> at me iff it's the latter.
> 
> In libmpcodecs/vd_realvid.c , near the start of function init(sh_video_t
> *sh), there's the following chunk of code:
> 
>   sprintf(path, REALCODEC_PATH "/%s", sh->codec->dll);
> 
>   /* first try to load linux dlls, if failed and we're supporting win32 dlls,
>      then try to load the windows ones */
> #ifdef HAVE_LIBDL       
>   if(strstr(sh->codec->dll,".dll") || !load_syms_linux(path))
> #endif
> #ifdef USE_WIN32DLL
>       if (!load_syms_windows(path))
> 
> This causes load_syms_windows to use the whole path as libname, and tries to
> search for this full path in each of the win codecs directories.  For
> example, (when drv43260.dll can be found in /usr/lib/win32) the following
> error results from using -vc rv40win :
> 
> 
> Forced video codec: rv40win
> Opening video decoder: [realvid] RealVideo decoder
> opening win32 dll '/usr/lib/RealPlayer8/Codecs/drv43260.dll'
> Win32 LoadLibrary failed to load: /usr/lib/RealPlayer8/Codecs/drv43260.dll, /usr/lib/win32//usr/lib/RealPlayer8/Codecs/drv43260.dll, /usr/local/lib/win32//usr/lib/RealPlayer8/Codecs/drv43260.dll
> Error loading dll
> ERROR: Could not open required DirectShow codec drv43260.dll.
> Read the RealVideo section of the DOCS!
> VDecoder init failed :(
> 
> 
> What I *think* it should be doing is
> 
>       if (!load_syms_windows(sh->codec->dll))
> 
> This produces:
> 
> 
> Forced video codec: rv40win
> Opening video decoder: [realvid] RealVideo decoder
> opening win32 dll 'drv43260.dll'
> Called unk__beginthreadex
> Selected video codec: [rv40win] vfm:realvid (Win32 RealPlayer 9 RV40 decoder)
> 
> 
> The same thing happens in ad_realaud.c.  The change is trivial, but I've
> attached a patch for both files, against current CVS.

This makes no difference for me on Linux, but lo and behold it fixes 
Real under Cygwin.  I am now finally able to watch Real movies under 
Windows 2000.  Good work!

Somebody please apply this quick.

Diego




More information about the MPlayer-dev-eng mailing list