[MPlayer-dev-eng] [PATCH] MinGW DVD key cache when HAVE_DIRECT_H not defined

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Apr 9 11:37:08 CEST 2006


Hi,
currently libmpdvdkit2 does not use a DVD key cache under MinGW since
neither HAVE_DIRECT_H is set (and IMHO that's good like that *g*) nor
the HOME environment variable is usually set.
The attached patch just tries the USERPROFILE variable next.
Unfortunately this will not result in the same path as with
HAVE_DIRECT_H set, but probably still is an improvement.
But even with this patch it takes ages to reopen a DVD with wrong region
code, does anyone have an idea what else might be wrong??

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: libmpdvdkit2/libdvdcss.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdvdkit2/libdvdcss.c,v
retrieving revision 1.18
diff -u -r1.18 libdvdcss.c
--- libmpdvdkit2/libdvdcss.c	24 Oct 2005 09:50:42 -0000	1.18
+++ libmpdvdkit2/libdvdcss.c	9 Apr 2006 09:36:58 -0000
@@ -301,6 +301,10 @@
         {
             psz_home = getenv( "HOME" );
         }
+        if( psz_home == NULL )
+        {
+            psz_home = getenv( "USERPROFILE" );
+        }
 
         /* Cache our keys in ${HOME}/.dvdcss/ */
         if( psz_home )


More information about the MPlayer-dev-eng mailing list