openbsd-ports/x11/mplayer/patches/patch-libmpcodecs_ad_realaud_c
espie 957b96a95f the linux realmedia codec can't work: our dlopen won't load them correctly.
More annoyingly, it abort()s the current process (thanks dale),
so comment them out, add the win32 codecs, and use them instead.

For some strange reason, the audio codec insists on being launched
from its own directory.

With this change, realmedia playing works.

okay sturm@, okay pvalchev@
2005-08-12 22:59:15 +00:00

22 lines
653 B
Plaintext

$OpenBSD: patch-libmpcodecs_ad_realaud_c,v 1.3 2005/08/12 22:59:16 espie Exp $
--- libmpcodecs/ad_realaud.c.orig Fri Aug 12 03:24:32 2005
+++ libmpcodecs/ad_realaud.c Fri Aug 12 03:26:04 2005
@@ -253,9 +253,17 @@ static int preinit(sh_audio_t *sh){
#ifdef USE_WIN32DLL
if (dll_type == 1)
{
+ int d;
+
+ /* for some bizarre reasons, we have to be in the right directory
+ * for this to work.
+ */
+ d = open(".", O_RDONLY);
+ chdir(REALCODEC_PATH);
for (i=0; i < strlen(path); i++)
if (path[i] == '/') path[i] = '\\';
wraSetDLLAccessPath(path);
+ fchdir(d);
}
else
#endif