summaryrefslogtreecommitdiffstats
path: root/libmpdvdkit2/libdvdcss_changes.diff
blob: b6b25810e2055afa895818df0a226cd8d9fc2681 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
--- common.h	2005-10-11 10:55:45.000000000 +0200
+++ common.h	2005-10-11 14:07:42.000000000 +0200
@@ -50,10 +53,9 @@
 #   define PATH_MAX MAX_PATH
 #endif
 
-#define lseek _lseeki64
-
 /* several type definitions */
 #   if defined( __MINGW32__ )
+#define lseek _lseeki64
 #       if !defined( _OFF_T_ )
 typedef long long _off_t;
 typedef _off_t off_t;
--- css.c	2005-07-11 14:24:09.000000000 +0200
+++ css.c	2005-10-01 20:14:37.000000000 +0200
@@ -53,7 +56,7 @@
 #   include <limits.h>
 #endif
 
-#include "dvdcss/dvdcss.h"
+#include "dvdcss.h"
 
 #include "common.h"
 #include "css.h"
--- device.c	2005-07-11 13:33:34.000000000 +0200
+++ device.c	2005-10-01 19:08:07.000000000 +0200
@@ -55,7 +44,7 @@
 #   include <sys/uio.h>                                      /* struct iovec */
 #endif
 
-#include "dvdcss/dvdcss.h"
+#include "dvdcss.h"
 
 #include "common.h"
 #include "css.h"
@@ -143,8 +132,11 @@
     print_debug( dvdcss, "opening target `%s'", psz_device );
 
 #if defined( WIN32 )
-    /* If device is not "X:", we are actually opening a file. */
-    dvdcss->b_file = !psz_device[0] || psz_device[1] != ':' || psz_device[2];
+    dvdcss->b_file = 1;
+    /* If device is "X:" or "X:\", we are not actually opening a file. */
+    if (psz_device[0] && psz_device[1] == ':' &&
+       (!psz_device[2] || (psz_device[2] == '\\' && !psz_device[3])))
+        dvdcss->b_file = 0;
 
     /* Initialize readv temporary buffer */
     dvdcss->p_readv_buffer   = NULL;
--- error.c	2004-02-24 16:46:49.000000000 +0100
+++ error.c	2005-10-01 20:15:46.000000000 +0200
@@ -34,7 +37,7 @@
 #   include <limits.h>
 #endif
 
-#include "dvdcss/dvdcss.h"
+#include "dvdcss.h"
 
 #include "common.h"
 #include "css.h"
--- libdvdcss.c	2004-08-13 15:40:18.000000000 +0200
+++ libdvdcss.c	2005-10-01 19:11:27.000000000 +0200
@@ -87,10 +87,7 @@
  *     values. This will speed up descrambling of DVDs which are in the
  *     cache. The DVDCSS_CACHE directory is created if it does not exist,
  *     and a subdirectory is created named after the DVD's title or
- *     manufacturing date. If DVDCSS_CACHE is not set or is empty, \e libdvdcss
- *     will use the default value which is "${HOME}/.dvdcss/" under Unix and
- *     "C:\Documents and Settings\$USER\Application Data\dvdcss\" under Win32.
- *     The special value "off" disables caching.
+ *     manufacturing date.
  */
 
 /*
@@ -124,7 +127,7 @@
 #   include <direct.h>
 #endif
 
-#include "dvdcss/dvdcss.h"
+#include "dvdcss.h"
 
 #include "common.h"
 #include "css.h"
@@ -132,6 +113,12 @@
 #include "ioctl.h"
 #include "device.h"
 
+#ifndef HAVE_MPLAYER
+ #include "get_path.c"
+#else
+ extern char * get_path( char * filename );
+#endif
+
 /**
  * \brief Symbol for version checks.
  *
@@ -233,6 +220,8 @@
         }
     }
 
+#if 0 /* MPlayer caches keys in its own configuration directory */
+
     /*
      *  If DVDCSS_CACHE was not set, try to guess a default value
      */
@@ -309,6 +298,8 @@
 #endif
     }
 
+#endif /* 0 */
+
     /*
      *  Find cache dir from the DVDCSS_CACHE environment variable
      */
@@ -326,6 +317,7 @@
             psz_cache = NULL;
         }
     }
+    else psz_cache = get_path( "DVDKeys" );
 
     /*
      *  Open device
@@ -504,9 +496,10 @@
             dvdcss->psz_cachefile[0] = '\0';
             goto nocache;
         }
+        i += sprintf( dvdcss->psz_cachefile + i, "/");
 
-        i += sprintf( dvdcss->psz_cachefile + i, "/%s-%s%s", psz_title,
-                      psz_serial, psz_key );
+//        i += sprintf( dvdcss->psz_cachefile + i, "/%s", psz_data );
+        i += sprintf( dvdcss->psz_cachefile + i, "/%s#%s", psz_title, psz_serial );
 #if !defined( WIN32 ) || defined( SYS_CYGWIN )
         i_ret = mkdir( dvdcss->psz_cachefile, 0755 );
 #else