annotate libdvdread/libdvdread_changes.diff @ 20911:5ab1e8c8f749

bump date of NUT spec for previous commit
author ods15
date Tue, 14 Nov 2006 17:05:20 +0000
parents 8b9a98c1f351
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
1 diff -Naur dvdread.orig/bswap.h dvdread/bswap.h
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
2 --- dvdread.orig/bswap.h 2005-06-23 00:18:54.000000000 +0200
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
3 +++ dvdread/bswap.h 2005-06-23 00:19:10.000000000 +0200
20793
8b9a98c1f351 Revert one more local change without effect.
diego
parents: 20790
diff changeset
4 @@ -59,13 +63,57 @@
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
5 #define B2N_32(x) x = be32toh(x)
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
6 #define B2N_64(x) x = be64toh(x)
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
7
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
8 +#elif defined(__DragonFly__)
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
9 +#include <sys/endian.h>
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
10 +#define B2N_16(x) x = be16toh(x)
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
11 +#define B2N_32(x) x = be32toh(x)
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
12 +#define B2N_64(x) x = be64toh(x)
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
13 +
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
14 +#elif defined(ARCH_X86)
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
15 +inline static unsigned short bswap_16(unsigned short x)
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
16 +{
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
17 + __asm("xchgb %b0,%h0" :
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
18 + "=q" (x) :
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
19 + "0" (x));
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
20 + return x;
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
21 +}
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
22 +#define B2N_16(x) x = bswap_16(x)
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
23 +
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
24 +inline static unsigned int bswap_32(unsigned int x)
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
25 +{
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
26 + __asm(
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
27 +#if __CPU__ > 386
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
28 + "bswap %0":
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
29 + "=r" (x) :
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
30 +#else
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
31 + "xchgb %b0,%h0\n"
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
32 + " rorl $16,%0\n"
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
33 + " xchgb %b0,%h0":
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
34 + "=q" (x) :
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
35 +#endif
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
36 + "0" (x));
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
37 + return x;
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
38 +}
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
39 +#define B2N_32(x) x = bswap_32(x)
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
40 +
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
41 +inline static unsigned long long int bswap_64(unsigned long long int x)
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
42 +{
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
43 + register union { __extension__ uint64_t __ll;
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
44 + uint32_t __l[2]; } __x;
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
45 + asm("xchgl %0,%1":
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
46 + "=r"(__x.__l[0]),"=r"(__x.__l[1]):
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
47 + "0"(bswap_32((unsigned long)x)),"1"(bswap_32((unsigned long)(x>>32))));
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
48 + return __x.__ll;
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
49 +}
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
50 +#define B2N_64(x) x = bswap_64(x)
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
51 +
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
52 /* This is a slow but portable implementation, it has multiple evaluation
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
53 * problems so beware.
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
54 * Old FreeBSD's and Solaris don't have <byteswap.h> or any other such
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
55 * functionality!
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
56 */
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
57
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
58 -#elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__)
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
59 +#elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defined(__CYGWIN__)
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
60 #define B2N_16(x) \
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
61 x = ((((x) & 0xff00) >> 8) | \
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
62 (((x) & 0x00ff) << 8))
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
63 diff -Naur dvdread.orig/.cvsignore dvdread/.cvsignore
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
64 diff -Naur dvdread.orig/dvd_input.c dvdread/dvd_input.c
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
65 --- dvdread.orig/dvd_input.c 2005-06-23 00:18:54.000000000 +0200
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
66 +++ dvdread/dvd_input.c 2005-06-23 00:30:23.000000000 +0200
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
67 @@ -37,7 +41,7 @@
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
68
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
69 #ifdef HAVE_DVDCSS_DVDCSS_H
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
70 /* linking to libdvdcss */
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
71 -#include <dvdcss/dvdcss.h>
19820
e5d97c5f3c32 Move dvdcss.h to a dvdcss subdirectory, just like upstream libdvdcss does.
diego
parents: 18910
diff changeset
72 +#include "dvdcss/dvdcss.h"
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
73 #define DVDcss_open(a) dvdcss_open((char*)(a))
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
74 #define DVDcss_close dvdcss_close
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
75 #define DVDcss_seek dvdcss_seek
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
76 @@ -74,7 +78,7 @@
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
77 dvd_input_t dev;
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
78
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
79 /* Allocate the handle structure */
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
80 - dev = (dvd_input_t) malloc(sizeof(dvd_input_t));
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
81 + dev = (dvd_input_t) malloc(sizeof(struct dvd_input_s));
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
82 if(dev == NULL) {
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
83 fprintf(stderr, "libdvdread: Could not allocate memory.\n");
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
84 return NULL;
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
85 @@ -154,7 +158,7 @@
17786
f0f54034c7e9 fix another sizeof(dvd_input_t) bug (must be struct dvd_input_s instead)
reimar
parents: 17313
diff changeset
86 dvd_input_t dev;
f0f54034c7e9 fix another sizeof(dvd_input_t) bug (must be struct dvd_input_s instead)
reimar
parents: 17313
diff changeset
87
f0f54034c7e9 fix another sizeof(dvd_input_t) bug (must be struct dvd_input_s instead)
reimar
parents: 17313
diff changeset
88 /* Allocate the library structure */
f0f54034c7e9 fix another sizeof(dvd_input_t) bug (must be struct dvd_input_s instead)
reimar
parents: 17313
diff changeset
89 - dev = (dvd_input_t) malloc(sizeof(dvd_input_t));
f0f54034c7e9 fix another sizeof(dvd_input_t) bug (must be struct dvd_input_s instead)
reimar
parents: 17313
diff changeset
90 + dev = (dvd_input_t) malloc(sizeof(struct dvd_input_s));
f0f54034c7e9 fix another sizeof(dvd_input_t) bug (must be struct dvd_input_s instead)
reimar
parents: 17313
diff changeset
91 if(dev == NULL) {
f0f54034c7e9 fix another sizeof(dvd_input_t) bug (must be struct dvd_input_s instead)
reimar
parents: 17313
diff changeset
92 fprintf(stderr, "libdvdread: Could not allocate memory.\n");
f0f54034c7e9 fix another sizeof(dvd_input_t) bug (must be struct dvd_input_s instead)
reimar
parents: 17313
diff changeset
93 return NULL;
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
94 @@ -320,8 +324,10 @@
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
95 fprintf(stderr, "DVDCSS_METHOD %s\n", psz_method);
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
96 fprintf(stderr, "DVDCSS_VERBOSE %s\n", psz_verbose);
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
97 */
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
98 + /*
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
99 fprintf(stderr, "libdvdread: Using libdvdcss version %s for DVD access\n",
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
100 *dvdcss_version);
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
101 + */
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
102
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
103 /* libdvdcss wrapper functions */
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
104 dvdinput_open = css_open;
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
105 diff -Naur dvdread.orig/dvd_input.h dvdread/dvd_input.h
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
106 diff -Naur dvdread.orig/dvd_reader.c dvdread/dvd_reader.c
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
107 --- dvdread.orig/dvd_reader.c 2005-06-23 00:18:54.000000000 +0200
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
108 +++ dvdread/dvd_reader.c 2005-06-23 00:19:10.000000000 +0200
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
109 @@ -32,24 +36,36 @@
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
110 #include <limits.h>
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
111 #include <dirent.h>
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
112
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
113 -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__bsdi__)|| defined(__DARWIN__)
17311
b1b8ff93dc0c Update with current changes.
diego
parents: 16847
diff changeset
114 +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__bsdi__) || defined(__DARWIN__) || defined(__DragonFly__)
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
115 #define SYS_BSD 1
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
116 #endif
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
117
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
118 #if defined(__sun)
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
119 #include <sys/mnttab.h>
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
120 +#elif defined(hpux)
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
121 +#include </usr/conf/h/mnttab.h>
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
122 #elif defined(SYS_BSD)
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
123 #include <fstab.h>
15535
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
124 -#elif defined(__linux__)
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
125 +#elif defined(__linux__) || defined(__CYGWIN__)
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
126 #include <mntent.h>
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
127 #endif
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
128
18910
5f31565951f7 MinGW 3.1 has added gettimeofday.
diego
parents: 18909
diff changeset
129 +#if defined(__MINGW32__) && (__MINGW32_MAJOR_VERSION <= 3) && (__MINGW32_MINOR_VERSION < 10)
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
130 +#include <sys/timeb.h>
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
131 +static void gettimeofday(struct timeval* t,void* timezone){
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
132 + struct timeb timebuffer;
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
133 + ftime( &timebuffer );
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
134 + t->tv_sec=timebuffer.time;
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
135 + t->tv_usec=1000*timebuffer.millitm;
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
136 +}
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
137 +#endif
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
138 +
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
139 #include "dvd_udf.h"
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
140 #include "dvd_input.h"
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
141 #include "dvd_reader.h"
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
142 #include "md5.h"
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
143
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
144 -#define DEFAULT_UDF_CACHE_LEVEL 1
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
145 +#define DEFAULT_UDF_CACHE_LEVEL 0
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
146
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
147 struct dvd_reader_s {
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
148 /* Basic information. */
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
149 @@ -278,11 +301,16 @@
16510
881e136ebf1a add FreeBSD default cd/dvd devices
nexus
parents: 15875
diff changeset
150 Darwin /dev/rdisk0, it needs to be the raw device
881e136ebf1a add FreeBSD default cd/dvd devices
nexus
parents: 15875
diff changeset
151 BSD/OS /dev/sr0c (if not mounted) or /dev/rsr0c ('c' any letter will do) */
881e136ebf1a add FreeBSD default cd/dvd devices
nexus
parents: 15875
diff changeset
152 static char *bsd_block2char( const char *path )
881e136ebf1a add FreeBSD default cd/dvd devices
nexus
parents: 15875
diff changeset
153 +#if defined(__FreeBSD__)
881e136ebf1a add FreeBSD default cd/dvd devices
nexus
parents: 15875
diff changeset
154 +{
881e136ebf1a add FreeBSD default cd/dvd devices
nexus
parents: 15875
diff changeset
155 + return (char *) strdup( path );
881e136ebf1a add FreeBSD default cd/dvd devices
nexus
parents: 15875
diff changeset
156 +}
881e136ebf1a add FreeBSD default cd/dvd devices
nexus
parents: 15875
diff changeset
157 +#else
881e136ebf1a add FreeBSD default cd/dvd devices
nexus
parents: 15875
diff changeset
158 {
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
159 char *new_path;
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
160
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
161 /* If it doesn't start with "/dev/" or does start with "/dev/r" exit */
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
162 - if( !strncmp( path, "/dev/", 5 ) || strncmp( path, "/dev/r", 6 ) )
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
163 + if( strncmp( path, "/dev/", 5 ) || !strncmp( path, "/dev/r", 6 ) )
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
164 return (char *) strdup( path );
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
165
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
166 /* Replace "/dev/" with "/dev/r" */
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
167 @@ -292,6 +320,7 @@
16510
881e136ebf1a add FreeBSD default cd/dvd devices
nexus
parents: 15875
diff changeset
168
881e136ebf1a add FreeBSD default cd/dvd devices
nexus
parents: 15875
diff changeset
169 return new_path;
881e136ebf1a add FreeBSD default cd/dvd devices
nexus
parents: 15875
diff changeset
170 }
881e136ebf1a add FreeBSD default cd/dvd devices
nexus
parents: 15875
diff changeset
171 +#endif /* __FreeBSD__ */
881e136ebf1a add FreeBSD default cd/dvd devices
nexus
parents: 15875
diff changeset
172 #endif
881e136ebf1a add FreeBSD default cd/dvd devices
nexus
parents: 15875
diff changeset
173
881e136ebf1a add FreeBSD default cd/dvd devices
nexus
parents: 15875
diff changeset
174 dvd_reader_t *DVDOpen( const char *path )
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
175 @@ -303,6 +332,16 @@
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
176 if( path == NULL )
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
177 return 0;
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
178
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
179 +#ifdef WIN32
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
180 + /* Stat doesn't work on devices under mingwin/cygwin. */
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
181 + if( path[0] && path[1] == ':' && path[2] == '\0' )
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
182 + {
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
183 + /* Don't try to stat the file */
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
184 + fileinfo.st_mode = S_IFBLK;
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
185 + }
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
186 + else
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
187 +#endif
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
188 + {
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
189 ret = stat( path, &fileinfo );
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
190 if( ret < 0 ) {
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
191 /* If we can't stat the file, give up */
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
192 @@ -310,6 +349,7 @@
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
193 perror("");
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
194 return 0;
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
195 }
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
196 + }
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
197
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
198 /* Try to open libdvdcss or fall back to standard functions */
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
199 have_css = dvdinput_setup();
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
200 @@ -335,7 +375,7 @@
15535
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
201 char *path_copy;
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
202 #if defined(SYS_BSD)
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
203 struct fstab* fe;
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
204 -#elif defined(__sun) || defined(__linux__)
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
205 +#elif defined(__sun) || defined(__linux__) || defined(__CYGWIN__)
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
206 FILE *mntfile;
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
207 #endif
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
208
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
209 @@ -350,7 +390,9 @@
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
210 if( cdir >= 0 ) {
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
211 chdir( path_copy );
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
212 new_path = getcwd( NULL, PATH_MAX );
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
213 +#ifndef __MINGW32__
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
214 fchdir( cdir );
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
215 +#endif
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
216 close( cdir );
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
217 if( new_path ) {
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
218 free( path_copy );
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
219 @@ -406,7 +448,7 @@
15535
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
220 }
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
221 fclose( mntfile );
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
222 }
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
223 -#elif defined(__linux__)
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
224 +#elif defined(__linux__) || defined(__CYGWIN__)
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
225 mntfile = fopen( MOUNTED, "r" );
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
226 if( mntfile ) {
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
227 struct mntent *me;
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
228 @@ -425,6 +467,9 @@
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
229 }
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
230 fclose( mntfile );
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
231 }
15535
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
232 +#elif defined(__MINGW32__)
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
233 + dev_name = strdup(path);
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
234 + auth_drive = DVDOpenImageFile( path, have_css );
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
235 #endif
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
236 if( !dev_name ) {
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
237 fprintf( stderr, "libdvdread: Couldn't find device name.\n" );
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
238 @@ -615,8 +660,8 @@
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
239 }
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
240
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
241 if( dvd->css_state == 1 /* Need key init */ ) {
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
242 - initAllCSSKeys( dvd );
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
243 - dvd->css_state = 2;
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
244 +// initAllCSSKeys( dvd );
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
245 +// dvd->css_state = 2;
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
246 }
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
247 /*
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
248 if( dvdinput_title( dvd_file->dvd->dev, (int)start ) < 0 ) {
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
249 @@ -915,7 +960,7 @@
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
250 return (ssize_t)ret;
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
251 }
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
252
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
253 -int32_t DVDFileSeek( dvd_file_t *dvd_file, int32_t offset )
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
254 +int DVDFileSeek( dvd_file_t *dvd_file, int offset )
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
255 {
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
256 /* Check arguments. */
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
257 if( dvd_file == NULL || offset < 0 )
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
258 diff -Naur dvdread.orig/dvdread_internal.h dvdread/dvdread_internal.h
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
259 --- dvdread.orig/dvdread_internal.h 2005-06-23 00:18:54.000000000 +0200
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
260 +++ dvdread/dvdread_internal.h 2005-06-23 00:19:10.000000000 +0200
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
261 @@ -2,11 +2,7 @@
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
262 #define DVDREAD_INTERNAL_H
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
263
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
264
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
265 -#define CHECK_VALUE(arg) \
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
266 - if(!(arg)) { \
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
267 - fprintf(stderr, "\n*** libdvdread: CHECK_VALUE failed in %s:%i ***" \
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
268 - "\n*** for %s ***\n\n", \
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
269 - __FILE__, __LINE__, # arg ); \
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
270 - }
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
271 +#define CHECK_VALUE(arg)
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
272 +
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
273
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
274 #endif /* DVDREAD_INTERNAL_H */
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
275 diff -Naur dvdread.orig/dvd_udf.c dvdread/dvd_udf.c
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
276 --- dvdread.orig/dvd_udf.c 2005-06-23 00:18:54.000000000 +0200
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
277 +++ dvdread/dvd_udf.c 2005-06-23 00:19:10.000000000 +0200
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
278 @@ -33,7 +37,9 @@
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
279 #include <stdio.h>
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
280 #include <stdlib.h>
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
281 #include <string.h>
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
282 +#ifndef __MINGW32__
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
283 #include <sys/ioctl.h>
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
284 +#endif
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
285 #include <sys/types.h>
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
286 #include <sys/stat.h>
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
287 #include <unistd.h>
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
288 diff -Naur dvdread.orig/ifo_print.c dvdread/ifo_print.c
16659
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
289 --- dvdread.orig/ifo_print.c 30 Jun 2005 22:48:26 -0000 1.4
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
290 +++ dvdread/ifo_print.c 3 Oct 2005 14:29:01 -0000 1.5
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
291 @@ -761,14 +761,14 @@
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
292 ifoPrint_USER_OPS(&pgc->prohibited_ops);
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
293
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
294 for(i = 0; i < 8; i++) {
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
295 - if(pgc->audio_control[i] & 0x8000) { /* The 'is present' bit */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
296 + if(pgc->audio_control[i].present) {
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
297 printf("Audio stream %i control: %04x\n",
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
298 i, pgc->audio_control[i]);
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
299 }
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
300 }
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
301
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
302 for(i = 0; i < 32; i++) {
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
303 - if(pgc->subp_control[i] & 0x80000000) { /* The 'is present' bit */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
304 + if(pgc->subp_control[i].present) {
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
305 printf("Subpicture stream %2i control: %08x\n",
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
306 i, pgc->subp_control[i]);
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
307 }
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
308
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
309 diff -Naur dvdread.orig/ifo_print.h dvdread/ifo_print.h
20615
1a4fcea7ab53 libmpdvdkit2 --> libdvdread, it just contains libdvdread now.
diego
parents: 19820
diff changeset
310 --- dvdread.orig/ifo_print.h 2002-08-15 22:13:21.000000000 +0200
1a4fcea7ab53 libmpdvdkit2 --> libdvdread, it just contains libdvdread now.
diego
parents: 19820
diff changeset
311 +++ dvdread/ifo_print.h 2005-12-29 13:13:21.000000000 +0100
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
312 @@ -20,8 +24,8 @@
17311
b1b8ff93dc0c Update with current changes.
diego
parents: 16847
diff changeset
313 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
b1b8ff93dc0c Update with current changes.
diego
parents: 16847
diff changeset
314 */
b1b8ff93dc0c Update with current changes.
diego
parents: 16847
diff changeset
315
b1b8ff93dc0c Update with current changes.
diego
parents: 16847
diff changeset
316 -#include <dvdread/ifo_types.h>
b1b8ff93dc0c Update with current changes.
diego
parents: 16847
diff changeset
317 -#include <dvdread/dvd_reader.h>
b1b8ff93dc0c Update with current changes.
diego
parents: 16847
diff changeset
318 +#include "ifo_types.h"
b1b8ff93dc0c Update with current changes.
diego
parents: 16847
diff changeset
319 +#include "dvd_reader.h"
b1b8ff93dc0c Update with current changes.
diego
parents: 16847
diff changeset
320
b1b8ff93dc0c Update with current changes.
diego
parents: 16847
diff changeset
321 #ifdef __cplusplus
b1b8ff93dc0c Update with current changes.
diego
parents: 16847
diff changeset
322 extern "C" {
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
323 diff -Naur dvdread.orig/ifo_read.c dvdread/ifo_read.c
16659
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
324 --- dvdread.orig/ifo_read.c 30 Jun 2005 22:48:26 -0000 1.4
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
325 +++ dvdread/ifo_read.c 3 Oct 2005 14:29:01 -0000 1.5
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
326 @@ -97,7 +101,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
327 ifo_handle_t *ifoOpen(dvd_reader_t *dvd, int title) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
328 ifo_handle_t *ifofile;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
329
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
330 - ifofile = (ifo_handle_t *)malloc(sizeof(ifo_handle_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
331 + ifofile = malloc(sizeof(ifo_handle_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
332 if(!ifofile)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
333 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
334
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
335 @@ -182,7 +186,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
336 ifo_handle_t *ifoOpenVMGI(dvd_reader_t *dvd) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
337 ifo_handle_t *ifofile;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
338
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
339 - ifofile = (ifo_handle_t *)malloc(sizeof(ifo_handle_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
340 + ifofile = malloc(sizeof(ifo_handle_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
341 if(!ifofile)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
342 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
343
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
344 @@ -209,7 +213,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
345 ifo_handle_t *ifoOpenVTSI(dvd_reader_t *dvd, int title) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
346 ifo_handle_t *ifofile;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
347
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
348 - ifofile = (ifo_handle_t *)malloc(sizeof(ifo_handle_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
349 + ifofile = malloc(sizeof(ifo_handle_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
350 if(!ifofile)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
351 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
352
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
353 @@ -274,7 +278,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
354 static int ifoRead_VMG(ifo_handle_t *ifofile) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
355 vmgi_mat_t *vmgi_mat;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
356
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
357 - vmgi_mat = (vmgi_mat_t *)malloc(sizeof(vmgi_mat_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
358 + vmgi_mat = malloc(sizeof(vmgi_mat_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
359 if(!vmgi_mat)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
360 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
361
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
362 @@ -365,7 +369,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
363 vtsi_mat_t *vtsi_mat;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
364 int i;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
365
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
366 - vtsi_mat = (vtsi_mat_t *)malloc(sizeof(vtsi_mat_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
367 + vtsi_mat = malloc(sizeof(vtsi_mat_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
368 if(!vtsi_mat)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
369 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
370
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
371 @@ -493,7 +497,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
372
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
373 if(cmd_tbl->nr_of_pre != 0) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
374 unsigned int pre_cmds_size = cmd_tbl->nr_of_pre * COMMAND_DATA_SIZE;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
375 - cmd_tbl->pre_cmds = (vm_cmd_t *)malloc(pre_cmds_size);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
376 + cmd_tbl->pre_cmds = malloc(pre_cmds_size);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
377 if(!cmd_tbl->pre_cmds)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
378 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
379
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
380 @@ -505,7 +509,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
381
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
382 if(cmd_tbl->nr_of_post != 0) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
383 unsigned int post_cmds_size = cmd_tbl->nr_of_post * COMMAND_DATA_SIZE;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
384 - cmd_tbl->post_cmds = (vm_cmd_t *)malloc(post_cmds_size);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
385 + cmd_tbl->post_cmds = malloc(post_cmds_size);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
386 if(!cmd_tbl->post_cmds) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
387 if(cmd_tbl->pre_cmds)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
388 free(cmd_tbl->pre_cmds);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
389 @@ -521,7 +525,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
390
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
391 if(cmd_tbl->nr_of_cell != 0) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
392 unsigned int cell_cmds_size = cmd_tbl->nr_of_cell * COMMAND_DATA_SIZE;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
393 - cmd_tbl->cell_cmds = (vm_cmd_t *)malloc(cell_cmds_size);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
394 + cmd_tbl->cell_cmds = malloc(cell_cmds_size);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
395 if(!cmd_tbl->cell_cmds) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
396 if(cmd_tbl->pre_cmds)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
397 free(cmd_tbl->pre_cmds);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
398 @@ -638,10 +642,6 @@
16659
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
399 B2N_16(pgc->cell_playback_offset);
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
400 B2N_16(pgc->cell_position_offset);
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
401
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
402 - for(i = 0; i < 8; i++)
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
403 - B2N_16(pgc->audio_control[i]);
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
404 - for(i = 0; i < 32; i++)
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
405 - B2N_32(pgc->subp_control[i]);
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
406 for(i = 0; i < 16; i++)
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
407 B2N_32(pgc->palette[i]);
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
408
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
409 @@ -650,10 +650,10 @@
16659
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
410
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
411 /* verify time (look at print_time) */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
412 for(i = 0; i < 8; i++)
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
413 - if(!pgc->audio_control[i] & 0x8000) /* The 'is present' bit */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
414 + if(!pgc->audio_control[i].present)
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
415 CHECK_ZERO(pgc->audio_control[i]);
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
416 for(i = 0; i < 32; i++)
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
417 - if(!pgc->subp_control[i] & 0x80000000) /* The 'is present' bit */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
418 + if(!pgc->subp_control[i].present)
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
419 CHECK_ZERO(pgc->subp_control[i]);
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
420
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
421 /* Check that time is 0:0:0:0 also if nr_of_programs == 0 */
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
422 @@ -752,7 +752,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
423 if(ifofile->vmgi_mat->first_play_pgc == 0)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
424 return 1;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
425
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
426 - ifofile->first_play_pgc = (pgc_t *)malloc(sizeof(pgc_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
427 + ifofile->first_play_pgc = malloc(sizeof(pgc_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
428 if(!ifofile->first_play_pgc)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
429 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
430
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
431 @@ -806,7 +806,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
432 if(!DVDFileSeek_(ifofile->file, ifofile->vmgi_mat->tt_srpt * DVD_BLOCK_LEN))
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
433 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
434
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
435 - tt_srpt = (tt_srpt_t *)malloc(sizeof(tt_srpt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
436 + tt_srpt = malloc(sizeof(tt_srpt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
437 if(!tt_srpt)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
438 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
439
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
440 @@ -823,7 +823,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
441
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
442 info_length = tt_srpt->last_byte + 1 - TT_SRPT_SIZE;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
443
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
444 - tt_srpt->title = (title_info_t *)malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
445 + tt_srpt->title = malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
446 if(!tt_srpt->title) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
447 free(tt_srpt);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
448 ifofile->tt_srpt = 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
449 @@ -908,7 +908,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
450 ifofile->vtsi_mat->vts_ptt_srpt * DVD_BLOCK_LEN))
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
451 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
452
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
453 - vts_ptt_srpt = (vts_ptt_srpt_t *)malloc(sizeof(vts_ptt_srpt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
454 + vts_ptt_srpt = malloc(sizeof(vts_ptt_srpt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
455 if(!vts_ptt_srpt)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
456 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
457
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
458 @@ -929,7 +929,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
459
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
460 info_length = vts_ptt_srpt->last_byte + 1 - VTS_PTT_SRPT_SIZE;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
461
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
462 - data = (uint32_t *)malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
463 + data = malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
464 if(!data) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
465 free(vts_ptt_srpt);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
466 ifofile->vts_ptt_srpt = 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
467 @@ -1047,7 +1047,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
468 if(!DVDFileSeek_(ifofile->file, ifofile->vmgi_mat->ptl_mait * DVD_BLOCK_LEN))
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
469 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
470
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
471 - ptl_mait = (ptl_mait_t *)malloc(sizeof(ptl_mait_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
472 + ptl_mait = malloc(sizeof(ptl_mait_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
473 if(!ptl_mait)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
474 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
475
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
476 @@ -1071,7 +1071,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
477 <= ptl_mait->last_byte + 1 - PTL_MAIT_SIZE);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
478
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
479 info_length = ptl_mait->nr_of_countries * sizeof(ptl_mait_country_t);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
480 - ptl_mait->countries = (ptl_mait_country_t *)malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
481 + ptl_mait->countries = malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
482 if(!ptl_mait->countries) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
483 free(ptl_mait);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
484 ifofile->ptl_mait = 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
485 @@ -1112,7 +1112,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
486 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
487 }
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
488 info_length = (ptl_mait->nr_of_vtss + 1) * sizeof(pf_level_t);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
489 - pf_temp = (uint16_t *)malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
490 + pf_temp = malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
491 if(!pf_temp) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
492 for(j = 0; j < i ; j++) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
493 free(ptl_mait->countries[j].pf_ptl_mai);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
494 @@ -1134,7 +1134,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
495 for (j = 0; j < ((ptl_mait->nr_of_vtss + 1) * 8); j++) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
496 B2N_16(pf_temp[j]);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
497 }
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
498 - ptl_mait->countries[i].pf_ptl_mai = (pf_level_t *)malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
499 + ptl_mait->countries[i].pf_ptl_mai = malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
500 if(!ptl_mait->countries[i].pf_ptl_mai) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
501 free(pf_temp);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
502 for(j = 0; j < i ; j++) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
503 @@ -1198,7 +1198,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
504 if(!DVDFileSeek_(ifofile->file, offset))
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
505 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
506
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
507 - vts_tmapt = (vts_tmapt_t *)malloc(sizeof(vts_tmapt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
508 + vts_tmapt = malloc(sizeof(vts_tmapt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
509 if(!vts_tmapt)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
510 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
511
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
512 @@ -1218,7 +1218,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
513
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
514 info_length = vts_tmapt->nr_of_tmaps * 4;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
515
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
516 - vts_tmap_srp = (uint32_t *)malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
517 + vts_tmap_srp = malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
518 if(!vts_tmap_srp) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
519 free(vts_tmapt);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
520 ifofile->vts_tmapt = NULL;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
521 @@ -1242,7 +1242,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
522
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
523 info_length = vts_tmapt->nr_of_tmaps * sizeof(vts_tmap_t);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
524
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
525 - vts_tmapt->tmap = (vts_tmap_t *)malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
526 + vts_tmapt->tmap = malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
527 if(!vts_tmapt->tmap) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
528 free(vts_tmap_srp);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
529 free(vts_tmapt);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
530 @@ -1274,7 +1274,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
531
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
532 info_length = vts_tmapt->tmap[i].nr_of_entries * sizeof(map_ent_t);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
533
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
534 - vts_tmapt->tmap[i].map_ent = (map_ent_t *)malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
535 + vts_tmapt->tmap[i].map_ent = malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
536 if(!vts_tmapt->tmap[i].map_ent) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
537 ifoFree_VTS_TMAPT(ifofile);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
538 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
539 @@ -1322,7 +1322,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
540 if(ifofile->vtsi_mat->vts_c_adt == 0) /* mandatory */
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
541 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
542
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
543 - ifofile->vts_c_adt = (c_adt_t *)malloc(sizeof(c_adt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
544 + ifofile->vts_c_adt = malloc(sizeof(c_adt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
545 if(!ifofile->vts_c_adt)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
546 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
547
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
548 @@ -1354,7 +1354,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
549 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
550 }
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
551
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
552 - ifofile->menu_c_adt = (c_adt_t *)malloc(sizeof(c_adt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
553 + ifofile->menu_c_adt = malloc(sizeof(c_adt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
554 if(!ifofile->menu_c_adt)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
555 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
556
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
557 @@ -1396,7 +1396,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
558 c_adt->nr_of_vobs = info_length / sizeof(cell_adr_t);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
559 }
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
560
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
561 - c_adt->cell_adr_table = (cell_adr_t *)malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
562 + c_adt->cell_adr_table = malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
563 if(!c_adt->cell_adr_table)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
564 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
565
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
566 @@ -1456,7 +1456,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
567 if(ifofile->vtsi_mat->vts_vobu_admap == 0) /* mandatory */
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
568 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
569
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
570 - ifofile->vts_vobu_admap = (vobu_admap_t *)malloc(sizeof(vobu_admap_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
571 + ifofile->vts_vobu_admap = malloc(sizeof(vobu_admap_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
572 if(!ifofile->vts_vobu_admap)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
573 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
574
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
575 @@ -1488,7 +1488,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
576 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
577 }
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
578
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
579 - ifofile->menu_vobu_admap = (vobu_admap_t *)malloc(sizeof(vobu_admap_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
580 + ifofile->menu_vobu_admap = malloc(sizeof(vobu_admap_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
581 if(!ifofile->menu_vobu_admap)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
582 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
583
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
584 @@ -1521,7 +1521,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
585 Titles with a VOBS that has no VOBUs. */
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
586 CHECK_VALUE(info_length % sizeof(uint32_t) == 0);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
587
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
588 - vobu_admap->vobu_start_sectors = (uint32_t *)malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
589 + vobu_admap->vobu_start_sectors = malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
590 if(!vobu_admap->vobu_start_sectors) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
591 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
592 }
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
593 @@ -1573,7 +1573,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
594 if(ifofile->vtsi_mat->vts_pgcit == 0) /* mandatory */
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
595 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
596
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
597 - ifofile->vts_pgcit = (pgcit_t *)malloc(sizeof(pgcit_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
598 + ifofile->vts_pgcit = malloc(sizeof(pgcit_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
599 if(!ifofile->vts_pgcit)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
600 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
601
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
602 @@ -1703,7 +1703,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
603 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
604 }
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
605
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
606 - ifofile->pgci_ut = (pgci_ut_t *)malloc(sizeof(pgci_ut_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
607 + ifofile->pgci_ut = malloc(sizeof(pgci_ut_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
608 if(!ifofile->pgci_ut)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
609 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
610
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
611 @@ -1893,7 +1893,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
612 if(!DVDFileSeek_(ifofile->file, sector * DVD_BLOCK_LEN))
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
613 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
614
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
615 - vts_atrt = (vts_atrt_t *)malloc(sizeof(vts_atrt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
616 + vts_atrt = malloc(sizeof(vts_atrt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
617 if(!vts_atrt)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
618 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
619
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
620 @@ -1915,7 +1915,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
621 VTS_ATRT_SIZE < vts_atrt->last_byte + 1);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
622
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
623 info_length = vts_atrt->nr_of_vtss * sizeof(uint32_t);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
624 - data = (uint32_t *)malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
625 + data = malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
626 if(!data) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
627 free(vts_atrt);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
628 ifofile->vts_atrt = 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
629 @@ -1937,7 +1937,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
630 }
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
631
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
632 info_length = vts_atrt->nr_of_vtss * sizeof(vts_attributes_t);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
633 - vts_atrt->vts = (vts_attributes_t *)malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
634 + vts_atrt->vts = malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
635 if(!vts_atrt->vts) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
636 free(data);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
637 free(vts_atrt);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
638 @@ -1993,7 +1993,7 @@
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
639 ifofile->vmgi_mat->txtdt_mgi * DVD_BLOCK_LEN))
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
640 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
641
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
642 - txtdt_mgi = (txtdt_mgi_t *)malloc(sizeof(txtdt_mgi_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
643 + txtdt_mgi = malloc(sizeof(txtdt_mgi_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
644 if(!txtdt_mgi) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
645 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
646 }
16659
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
647
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
648 diff -Naur dvdread.orig/ifo_read.h dvdread/ifo_read.h
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
649 --- dvdread.orig/ifo_read.h 2005-06-23 00:18:54.000000000 +0200
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
650 +++ dvdread/ifo_read.h 2005-06-23 00:19:10.000000000 +0200
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
651 @@ -20,8 +24,8 @@
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
652 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
653 */
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
654
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
655 -#include <dvdread/ifo_types.h>
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
656 -#include <dvdread/dvd_reader.h>
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
657 +#include "ifo_types.h"
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
658 +#include "dvd_reader.h"
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
659
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
660 #ifdef __cplusplus
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
661 extern "C" {
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
662 diff -Naur dvdread.orig/ifo_types.h dvdread/ifo_types.h
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
663 --- dvdread.orig/ifo_types.h 2005-06-23 00:18:54.000000000 +0200
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
664 +++ dvdread/ifo_types.h 2005-06-23 00:19:10.000000000 +0200
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
665 @@ -21,7 +25,7 @@
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
666 */
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
667
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
668 #include <inttypes.h>
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
669 -#include <dvdread/dvd_reader.h>
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
670 +#include "dvd_reader.h"
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
671
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
672
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
673 #undef ATTRIBUTE_PACKED
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
674 @@ -394,6 +398,55 @@
16659
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
675 } ATTRIBUTE_PACKED user_ops_t;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
676
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
677 /**
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
678 + * Subpicture stream mapping for a subtitle
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
679 + */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
680 +typedef struct {
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
681 +#ifdef WORDS_BIGENDIAN
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
682 + unsigned int present : 1;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
683 + unsigned int zero1 : 2;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
684 + unsigned int s_4p3 : 5; /* stream for 4:3 on any display */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
685 +
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
686 + unsigned int zero2 : 3;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
687 + unsigned int s_wide : 5; /* stream for 16:9 on widescreen display */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
688 +
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
689 + unsigned int zero3 : 3;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
690 + unsigned int s_lbox : 5; /* stream for 16:9 on letterboxed 4:3 display */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
691 +
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
692 + unsigned int zero4 : 3;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
693 + unsigned int s_panscan : 5; /* stream for 16:9 with pan&scan data on 4:3 display */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
694 +#else
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
695 + unsigned int s_4p3 : 5; /* stream for 4:3 on any display */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
696 + unsigned int zero1 : 2;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
697 + unsigned int present : 1;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
698 +
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
699 + unsigned int s_wide : 5; /* stream for 16:9 on widescreen display */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
700 + unsigned int zero2 : 3;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
701 +
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
702 + unsigned int s_lbox : 5; /* stream for 16:9 on letterboxed 4:3 display */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
703 + unsigned int zero3 : 3;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
704 +
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
705 + unsigned int s_panscan : 5; /* stream for 16:9 with pan&scan data on 4:3 display */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
706 + unsigned int zero4 : 3;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
707 +#endif
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
708 +} ATTRIBUTE_PACKED subp_mapping_t;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
709 +
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
710 +/**
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
711 + * Audio stream mapping for a soundtrack
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
712 + */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
713 +typedef struct {
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
714 +#ifdef WORDS_BIGENDIAN
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
715 + unsigned int present : 1;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
716 + unsigned int zero1 : 4;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
717 + unsigned int s_audio : 3;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
718 +#else
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
719 + unsigned int s_audio : 3;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
720 + unsigned int zero1 : 4;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
721 + unsigned int present : 1;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
722 +#endif
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
723 + uint8_t zero2;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
724 +} ATTRIBUTE_PACKED audio_mapping_t;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
725 +
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
726 +/**
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
727 * Program Chain Information.
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
728 */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
729 typedef struct {
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
730 @@ -402,8 +455,8 @@
16659
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
731 uint8_t nr_of_cells;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
732 dvd_time_t playback_time;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
733 user_ops_t prohibited_ops;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
734 - uint16_t audio_control[8]; /* New type? */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
735 - uint32_t subp_control[32]; /* New type? */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
736 + audio_mapping_t audio_control[8];
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
737 + subp_mapping_t subp_control[32];
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
738 uint16_t next_pgc_nr;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
739 uint16_t prev_pgc_nr;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
740 uint16_t goup_pgc_nr;
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
741 diff -Naur dvdread.orig/nav_print.c dvdread/nav_print.c
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
742 diff -Naur dvdread.orig/nav_print.h dvdread/nav_print.h
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
743 --- dvdread.orig/nav_print.h 2005-06-23 00:18:54.000000000 +0200
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
744 +++ dvdread/nav_print.h 2005-06-23 00:19:10.000000000 +0200
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
745 @@ -20,7 +24,7 @@
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
746 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
747 */
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
748
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
749 -#include <dvdread/nav_types.h>
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
750 +#include "nav_types.h"
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
751
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
752 /**
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
753 * Pretty printing of the NAV packets, PCI and DSI structs.
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
754 diff -Naur dvdread.orig/nav_read.c dvdread/nav_read.c
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
755 diff -Naur dvdread.orig/nav_read.h dvdread/nav_read.h
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
756 --- dvdread.orig/nav_read.h 2005-06-23 00:18:54.000000000 +0200
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
757 +++ dvdread/nav_read.h 2005-06-23 00:19:10.000000000 +0200
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
758 @@ -19,7 +23,7 @@
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
759 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
760 */
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
761
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
762 -#include <dvdread/nav_types.h>
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
763 +#include "nav_types.h"
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
764
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
765 /**
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
766 * Parsing of NAV data, PCI and DSI parts.
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
767 diff -Naur dvdread.orig/nav_types.h dvdread/nav_types.h
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
768 --- dvdread.orig/nav_types.h 2005-06-23 00:18:54.000000000 +0200
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
769 +++ dvdread/nav_types.h 2005-06-23 00:19:10.000000000 +0200
18371
50b3c9a53e21 cosmetics: Make patch apply cleanly.
diego
parents: 17786
diff changeset
770 @@ -30,7 +34,7 @@
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
771 */
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
772
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
773 #include <inttypes.h>
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
774 -#include <dvdread/ifo_types.h> /* only dvd_time_t, vm_cmd_t and user_ops_t */
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
775 +#include "ifo_types.h" /* only dvd_time_t, vm_cmd_t and user_ops_t */
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
776
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
777
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
778 #undef ATTRIBUTE_PACKED