summaryrefslogtreecommitdiff
path: root/src/input/libdvdread/diff_against_cvs.patch
blob: 237f6753c3d6cc4971dd9747c86f1672065f8dbe (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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
--- src/input/libdvdread/ifo_print.h	Sun Apr  7 19:52:01 2002
+++ src/input/libdvdread/ifo_print.h	Sat Aug 10 15:47:34 2002
@@ -20,8 +20,8 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <dvdread/ifo_types.h>
-#include <dvdread/dvd_reader.h>
+#include "ifo_types.h"
+#include "dvd_reader.h"
 
 #ifdef __cplusplus
 extern "C" {
--- src/input/libdvdread/ifo_read.h	Sun Apr  7 19:52:01 2002
+++ src/input/libdvdread/ifo_read.h	Sat Aug 10 15:47:59 2002
@@ -20,8 +20,8 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <dvdread/ifo_types.h>
-#include <dvdread/dvd_reader.h>
+#include "ifo_types.h"
+#include "dvd_reader.h"
 
 #ifdef __cplusplus
 extern "C" {
--- src/input/libdvdread/ifo_types.h	Sun Apr  7 19:52:01 2002
+++ src/input/libdvdread/ifo_types.h	Sat Aug 10 15:48:25 2002
@@ -21,7 +21,7 @@
  */
 
 #include <inttypes.h>
-#include <dvdread/dvd_reader.h>
+#include "dvd_reader.h"
 
 
 #undef ATTRIBUTE_PACKED
--- src/input/libdvdread/nav_print.h	Sun Apr  7 20:17:19 2002
+++ src/input/libdvdread/nav_print.h	Sat Aug 10 15:48:53 2002
@@ -20,7 +20,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <dvdread/nav_types.h>
+#include "nav_types.h"
 
 #ifdef __cplusplus
 extern "C" {
--- src/input/libdvdread/nav_read.c	Sun Apr  7 19:52:01 2002
+++ src/input/libdvdread/nav_read.c	Fri Aug  9 17:06:58 2002
@@ -26,8 +26,12 @@
 #include "nav_types.h"
 #include "nav_read.h"
 
+/*
+#define STRICT
+*/
+
 void navRead_PCI(pci_t *pci, unsigned char *buffer) {
-  int i, j, k;
+  int i, j;
 
   assert(sizeof(pci_t) == PCI_BYTES - 1); // -1 for substream id
   
@@ -71,6 +75,7 @@
 #endif
 
 
+#ifdef STRICT
   /* Asserts */
 
   /* pci pci gi */ 
@@ -95,6 +100,7 @@
   /* pci hli btnit */
   for(i = 0; i < pci->hli.hl_gi.btngr_ns; i++) {
     for(j = 0; j < (36 / pci->hli.hl_gi.btngr_ns); j++) {
+      int k;
       int n = (36 / pci->hli.hl_gi.btngr_ns) * i + j;
       assert(pci->hli.btnit[n].zero1 == 0);
       assert(pci->hli.btnit[n].zero2 == 0);
@@ -127,6 +133,7 @@
       }
     }
   }
+#endif
 }
 
 void navRead_DSI(dsi_t *dsi, unsigned char *buffer) {
@@ -178,9 +185,11 @@
     B2N_32(dsi->synci.sp_synca[i]);
 
   
+#ifdef STRICT
   /* Asserts */
 
   /* dsi dsi gi */
   assert(dsi->dsi_gi.zero1 == 0);
+#endif
 }
 
--- src/input/libdvdread/nav_read.h	Sun Apr  7 20:17:19 2002
+++ src/input/libdvdread/nav_read.h	Sat Aug 10 15:49:26 2002
@@ -19,7 +19,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <dvdread/nav_types.h>
+#include "nav_types.h"
 
 #ifdef __cplusplus
 extern "C" {
--- src/input/libdvdread/nav_types.h	Sun Apr  7 20:41:59 2002
+++ src/input/libdvdread/nav_types.h	Sat Aug 10 15:49:47 2002
@@ -30,7 +30,7 @@
  */
 
 #include <inttypes.h>
-#include <dvdread/ifo_types.h> // only dvd_time_t, vm_cmd_t and user_ops_t
+#include "ifo_types.h" // only dvd_time_t, vm_cmd_t and user_ops_t
 
 
 #undef ATTRIBUTE_PACKED
--- src/input/libdvdread/dvd_reader.c	Sun May 19 17:48:41 2002
+++ src/input/libdvdread/dvd_reader.c	Mon Aug 19 18:09:46 2002
@@ -857,7 +857,7 @@
 
 ssize_t DVDReadBytes( dvd_file_t *dvd_file, void *data, size_t byte_size )
 {
-    unsigned char *secbuf;
+    unsigned char *secbuf_base, *secbuf;
     unsigned int numsec, seek_sector, seek_byte;
     int ret;
     
@@ -865,7 +865,8 @@
     seek_byte   = dvd_file->seek_pos % DVD_VIDEO_LB_LEN;
 
     numsec = ( ( seek_byte + byte_size ) / DVD_VIDEO_LB_LEN ) + 1;
-    secbuf = (unsigned char *) malloc( numsec * DVD_VIDEO_LB_LEN );
+    secbuf_base = (unsigned char *) malloc( numsec * DVD_VIDEO_LB_LEN + 2048 );
+    secbuf = (unsigned char *)(((int)secbuf_base & ~2047) + 2048);
     if( !secbuf ) {
 	fprintf( stderr, "libdvdread: Can't allocate memory " 
 		 "for file read!\n" );
@@ -881,12 +882,12 @@
     }
 
     if( ret != (int) numsec ) {
-        free( secbuf );
+        free( secbuf_base );
         return ret < 0 ? ret : 0;
     }
 
     memcpy( data, &(secbuf[ seek_byte ]), byte_size );
-    free( secbuf );
+    free( secbuf_base );
 
     dvd_file->seek_pos += byte_size;
     return byte_size;
--- src/input/libdvdread/dvd_udf.c	Mon May  6 22:16:31 2002
+++ src/input/libdvdread/dvd_udf.c	Mon Aug 19 18:11:32 2002
@@ -264,7 +264,8 @@
 static int UDFMapICB( dvd_reader_t *device, struct AD ICB, uint8_t *FileType,
 		      struct Partition *partition, struct AD *File ) 
 {
-    uint8_t LogBlock[DVD_VIDEO_LB_LEN];
+    uint8_t LogBlock_base[DVD_VIDEO_LB_LEN + 2048];
+    uint8_t *LogBlock = (uint8_t *)(((int)LogBlock_base & ~2047) + 2048);
     uint32_t lbnum;
     uint16_t TagID;
 
@@ -296,7 +297,8 @@
                        struct Partition *partition, struct AD *FileICB ) 
 {
     char filename[ MAX_UDF_FILE_NAME_LEN ];
-    uint8_t directory[ 2 * DVD_VIDEO_LB_LEN ];
+    uint8_t directory_base[ 2 * DVD_VIDEO_LB_LEN + 2048];
+    uint8_t *directory = (uint8_t *)(((int)directory_base & ~2047) + 2048);
     uint32_t lbnum;
     uint16_t TagID;
     uint8_t filechar;
@@ -342,7 +344,10 @@
 static int UDFFindPartition( dvd_reader_t *device, int partnum,
 			     struct Partition *part ) 
 {
-    uint8_t LogBlock[ DVD_VIDEO_LB_LEN ], Anchor[ DVD_VIDEO_LB_LEN ];
+    uint8_t LogBlock_base[ DVD_VIDEO_LB_LEN + 2048 ];
+    uint8_t *LogBlock = (uint8_t *)(((int)LogBlock_base & ~2047) + 2048);
+    uint8_t Anchor_base[ DVD_VIDEO_LB_LEN + 2048 ];
+    uint8_t *Anchor = (uint8_t *)(((int)Anchor_base & ~2047) + 2048);
     uint32_t lbnum, MVDS_location, MVDS_length;
     uint16_t TagID;
     uint32_t lastsector;
@@ -434,7 +439,8 @@
 uint32_t UDFFindFile( dvd_reader_t *device, char *filename,
 		      uint32_t *filesize )
 {
-    uint8_t LogBlock[ DVD_VIDEO_LB_LEN ];
+    uint8_t LogBlock_base[ DVD_VIDEO_LB_LEN + 2048 ];
+    uint8_t *LogBlock = (uint8_t *)(((int)LogBlock_base & ~2047) + 2048);
     uint32_t lbnum;
     uint16_t TagID;
     struct Partition partition;