annotate dvdread/libdvdread_changes.diff @ 24715:0bd9dc0d3863

Simplify directfb/dfbmga test.
author diego
date Mon, 08 Oct 2007 11:42:47 +0000
parents cda2c4f38003
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
1 --- dvdread.orig/dvd_reader.c 2007-08-06 13:34:37.000000000 +0200
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
2 +++ dvdread/dvd_reader.c 2007-08-06 13:35:19.000000000 +0200
24066
aeb5561cf68b Sync local diff with latest changes.
diego
parents: 24057
diff changeset
3 @@ -39,9 +43,11 @@
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
4
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
5 #if defined(__sun)
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
6 #include <sys/mnttab.h>
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
7 +#elif defined(hpux)
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
8 +#include </usr/conf/h/mnttab.h>
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
9 #elif defined(SYS_BSD)
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
10 #include <fstab.h>
15535
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
11 -#elif defined(__linux__)
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
12 +#elif defined(__linux__) || defined(__CYGWIN__)
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
13 #include <mntent.h>
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
14 #endif
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
15
24066
aeb5561cf68b Sync local diff with latest changes.
diego
parents: 24057
diff changeset
16 @@ -52,7 +58,7 @@
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
17
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
18 #include "dvdread_internal.h"
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
19
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
20 -#define DEFAULT_UDF_CACHE_LEVEL 1
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
21 +#define DEFAULT_UDF_CACHE_LEVEL 0
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
22
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
23 struct dvd_reader_s {
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
24 /* Basic information. */
24095
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
25 @@ -183,19 +189,7 @@
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
26 dev->align = align;
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
27 }
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
28
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
29 -#ifdef WIN32 /* replacement gettimeofday implementation */
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
30 -#include <sys/timeb.h>
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
31 -static int gettimeofday( struct timeval *tv, void *tz )
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
32 -{
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
33 - struct timeb t;
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
34 - ftime( &t );
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
35 - tv->tv_sec = t.time;
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
36 - tv->tv_usec = t.millitm * 1000;
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
37 - return 0;
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
38 -}
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
39 -#endif
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
40
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
41 -
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
42 /* Loop over all titles and call dvdcss_title to crack the keys. */
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
43 static int initAllCSSKeys( dvd_reader_t *dvd )
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
44 {
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
45 @@ -494,7 +488,7 @@
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
46 char *path_copy;
15535
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
47 #if defined(SYS_BSD)
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
48 struct fstab* fe;
15535
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
49 -#elif defined(__sun) || defined(__linux__)
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
50 +#elif defined(__sun) || defined(__linux__) || defined(__CYGWIN__)
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
51 FILE *mntfile;
15535
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
52 #endif
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
53
24095
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
54 @@ -598,7 +592,7 @@
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
55 }
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
56 fclose( mntfile );
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
57 }
15535
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
58 -#elif defined(__linux__)
5b5ca5c4f381 Update for latest Cygwin-related changes.
diego
parents: 14937
diff changeset
59 +#elif defined(__linux__) || defined(__CYGWIN__)
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
60 mntfile = fopen( MOUNTED, "r" );
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
61 if( mntfile ) {
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
62 struct mntent *me;
24095
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
63 @@ -623,6 +617,9 @@
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
64 }
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
65 fclose( mntfile );
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
66 }
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
67 +#elif defined(__MINGW32__)
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
68 + dev_name = strdup(path);
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
69 + auth_drive = DVDOpenImageFile( path, have_css );
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
70 #endif
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
71 if( !dev_name ) {
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
72 if(verbose >= 1) {
24095
cda2c4f38003 Remove Windows-only replacement gettimeofday() implementation, both Cygwin
diego
parents: 24080
diff changeset
73 @@ -841,8 +838,8 @@
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
74 }
14937
d18e40806248 MPlayer-specific changes to libdvdread
diego
parents:
diff changeset
75
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
76 if( dvd->css_state == 1 /* Need key init */ ) {
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
77 - initAllCSSKeys( dvd );
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
78 - dvd->css_state = 2;
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
79 +// initAllCSSKeys( dvd );
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
80 +// dvd->css_state = 2;
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
81 }
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
82 /*
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
83 if( dvdinput_title( dvd_file->dvd->dev, (int)start ) < 0 ) {
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
84
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
85 --- dvdread.orig/dvdread_internal.h 2005-09-12 21:42:12.000000000 +0200
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
86 +++ dvdread/dvdread_internal.h 2007-08-06 12:57:08.000000000 +0200
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
87 @@ -3,12 +3,7 @@
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
88 #define DVDREAD_INTERNAL_H
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
89
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
90
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
91 -#define CHECK_VALUE(arg) \
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
92 - if(!(arg)) { \
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
93 - fprintf(stderr, "\n*** libdvdread: CHECK_VALUE failed in %s:%i ***" \
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
94 - "\n*** for %s ***\n\n", \
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
95 - __FILE__, __LINE__, # arg ); \
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
96 - }
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
97 +#define CHECK_VALUE(arg)
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
98
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
99
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
100 int get_verbose(void);
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
101
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
102 --- dvdread.orig/ifo_print.c 2005-09-15 18:54:29.000000000 +0200
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
103 +++ dvdread/ifo_print.c 2007-08-06 12:52:32.000000000 +0200
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
104 @@ -793,14 +797,14 @@
16659
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
105 ifoPrint_USER_OPS(&pgc->prohibited_ops);
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
106
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
107 for(i = 0; i < 8; i++) {
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
108 - if(pgc->audio_control[i] & 0x8000) { /* The 'is present' bit */
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
109 + if(pgc->audio_control[i].present) { /* The 'is present' bit */
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
110 printf("Audio stream %i control: %04x\n",
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
111 i, pgc->audio_control[i]);
16659
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
112 }
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
113 }
16659
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
114
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
115 for(i = 0; i < 32; i++) {
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
116 - if(pgc->subp_control[i] & 0x80000000) { /* The 'is present' bit */
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
117 + if(pgc->subp_control[i].present) { /* The 'is present' bit */
16659
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
118 printf("Subpicture stream %2i control: %08x\n",
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
119 i, pgc->subp_control[i]);
16659
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
120 }
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
121
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
122 --- dvdread.orig/ifo_read.c 2006-01-22 13:19:19.000000000 +0100
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
123 +++ dvdread/ifo_read.c 2007-08-06 13:15:55.000000000 +0200
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
124 @@ -110,7 +114,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
125 ifo_handle_t *ifoOpen(dvd_reader_t *dvd, int title) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
126 ifo_handle_t *ifofile;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
127
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
128 - ifofile = (ifo_handle_t *)malloc(sizeof(ifo_handle_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
129 + ifofile = malloc(sizeof(ifo_handle_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
130 if(!ifofile)
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
131 return NULL;
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
132
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
133 @@ -240,7 +244,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
134 ifo_handle_t *ifoOpenVMGI(dvd_reader_t *dvd) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
135 ifo_handle_t *ifofile;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
136
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
137 - ifofile = (ifo_handle_t *)malloc(sizeof(ifo_handle_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
138 + ifofile = malloc(sizeof(ifo_handle_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
139 if(!ifofile)
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
140 return NULL;
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
141
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
142 @@ -292,7 +296,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
143 ifo_handle_t *ifoOpenVTSI(dvd_reader_t *dvd, int title) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
144 ifo_handle_t *ifofile;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
145
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
146 - ifofile = (ifo_handle_t *)malloc(sizeof(ifo_handle_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
147 + ifofile = malloc(sizeof(ifo_handle_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
148 if(!ifofile)
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
149 return NULL;
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
150
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
151 @@ -382,7 +386,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
152 static int ifoRead_VMG(ifo_handle_t *ifofile) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
153 vmgi_mat_t *vmgi_mat;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
154
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
155 - vmgi_mat = (vmgi_mat_t *)malloc(sizeof(vmgi_mat_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
156 + vmgi_mat = malloc(sizeof(vmgi_mat_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
157 if(!vmgi_mat)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
158 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
159
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
160 @@ -473,7 +477,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
161 vtsi_mat_t *vtsi_mat;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
162 int i;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
163
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
164 - vtsi_mat = (vtsi_mat_t *)malloc(sizeof(vtsi_mat_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
165 + vtsi_mat = malloc(sizeof(vtsi_mat_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
166 if(!vtsi_mat)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
167 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
168
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
169 @@ -606,7 +610,7 @@
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
170
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
171 if(cmd_tbl->nr_of_pre != 0) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
172 unsigned int pre_cmds_size = cmd_tbl->nr_of_pre * COMMAND_DATA_SIZE;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
173 - cmd_tbl->pre_cmds = (vm_cmd_t *)malloc(pre_cmds_size);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
174 + cmd_tbl->pre_cmds = malloc(pre_cmds_size);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
175 if(!cmd_tbl->pre_cmds)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
176 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
177
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
178 @@ -618,7 +622,7 @@
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
179
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
180 if(cmd_tbl->nr_of_post != 0) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
181 unsigned int post_cmds_size = cmd_tbl->nr_of_post * COMMAND_DATA_SIZE;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
182 - cmd_tbl->post_cmds = (vm_cmd_t *)malloc(post_cmds_size);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
183 + cmd_tbl->post_cmds = malloc(post_cmds_size);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
184 if(!cmd_tbl->post_cmds) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
185 if(cmd_tbl->pre_cmds)
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
186 free(cmd_tbl->pre_cmds);
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
187 @@ -634,7 +638,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
188
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
189 if(cmd_tbl->nr_of_cell != 0) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
190 unsigned int cell_cmds_size = cmd_tbl->nr_of_cell * COMMAND_DATA_SIZE;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
191 - cmd_tbl->cell_cmds = (vm_cmd_t *)malloc(cell_cmds_size);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
192 + cmd_tbl->cell_cmds = malloc(cell_cmds_size);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
193 if(!cmd_tbl->cell_cmds) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
194 if(cmd_tbl->pre_cmds)
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
195 free(cmd_tbl->pre_cmds);
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
196 @@ -751,10 +755,6 @@
16659
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
197 B2N_16(pgc->cell_playback_offset);
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
198 B2N_16(pgc->cell_position_offset);
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
199
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
200 - for(i = 0; i < 8; i++)
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
201 - B2N_16(pgc->audio_control[i]);
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
202 - for(i = 0; i < 32; i++)
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
203 - B2N_32(pgc->subp_control[i]);
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
204 for(i = 0; i < 16; i++)
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
205 B2N_32(pgc->palette[i]);
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
206
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
207 @@ -763,10 +763,10 @@
16659
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
208
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
209 /* verify time (look at print_time) */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
210 for(i = 0; i < 8; i++)
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
211 - if(!pgc->audio_control[i] & 0x8000) /* The 'is present' bit */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
212 + if(!pgc->audio_control[i].present)
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
213 CHECK_ZERO(pgc->audio_control[i]);
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
214 for(i = 0; i < 32; i++)
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
215 - if(!pgc->subp_control[i] & 0x80000000) /* The 'is present' bit */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
216 + if(!pgc->subp_control[i].present)
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
217 CHECK_ZERO(pgc->subp_control[i]);
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
218
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
219 /* Check that time is 0:0:0:0 also if nr_of_programs == 0 */
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
220 @@ -880,7 +880,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
221 if(ifofile->vmgi_mat->first_play_pgc == 0)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
222 return 1;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
223
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
224 - ifofile->first_play_pgc = (pgc_t *)malloc(sizeof(pgc_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
225 + ifofile->first_play_pgc = malloc(sizeof(pgc_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
226 if(!ifofile->first_play_pgc)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
227 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
228
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
229 @@ -934,7 +934,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
230 if(!DVDFileSeek_(ifofile->file, ifofile->vmgi_mat->tt_srpt * DVD_BLOCK_LEN))
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
231 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
232
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
233 - tt_srpt = (tt_srpt_t *)malloc(sizeof(tt_srpt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
234 + tt_srpt = malloc(sizeof(tt_srpt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
235 if(!tt_srpt)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
236 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
237
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
238 @@ -953,7 +953,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
239
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
240 info_length = tt_srpt->last_byte + 1 - TT_SRPT_SIZE;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
241
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
242 - tt_srpt->title = (title_info_t *)malloc(info_length);
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
243 + tt_srpt->title = malloc(info_length);
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
244 if(!tt_srpt->title) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
245 free(tt_srpt);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
246 ifofile->tt_srpt = 0;
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
247 @@ -1040,7 +1040,7 @@
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
248 ifofile->vtsi_mat->vts_ptt_srpt * DVD_BLOCK_LEN))
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
249 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
250
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
251 - vts_ptt_srpt = (vts_ptt_srpt_t *)malloc(sizeof(vts_ptt_srpt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
252 + vts_ptt_srpt = malloc(sizeof(vts_ptt_srpt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
253 if(!vts_ptt_srpt)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
254 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
255
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
256 @@ -1063,7 +1063,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
257
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
258 info_length = vts_ptt_srpt->last_byte + 1 - VTS_PTT_SRPT_SIZE;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
259
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
260 - data = (uint32_t *)malloc(info_length);
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
261 + data = malloc(info_length);
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
262 if(!data) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
263 free(vts_ptt_srpt);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
264 ifofile->vts_ptt_srpt = 0;
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
265 @@ -1183,7 +1183,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
266 if(!DVDFileSeek_(ifofile->file, ifofile->vmgi_mat->ptl_mait * DVD_BLOCK_LEN))
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
267 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
268
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
269 - ptl_mait = (ptl_mait_t *)malloc(sizeof(ptl_mait_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
270 + ptl_mait = malloc(sizeof(ptl_mait_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
271 if(!ptl_mait)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
272 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
273
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
274 @@ -1207,7 +1207,7 @@
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
275 <= ptl_mait->last_byte + 1 - PTL_MAIT_SIZE);
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
276
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
277 info_length = ptl_mait->nr_of_countries * sizeof(ptl_mait_country_t);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
278 - ptl_mait->countries = (ptl_mait_country_t *)malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
279 + ptl_mait->countries = malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
280 if(!ptl_mait->countries) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
281 free(ptl_mait);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
282 ifofile->ptl_mait = 0;
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
283 @@ -1252,7 +1252,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
284 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
285 }
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
286 info_length = (ptl_mait->nr_of_vtss + 1) * sizeof(pf_level_t);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
287 - pf_temp = (uint16_t *)malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
288 + pf_temp = malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
289 if(!pf_temp) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
290 for(j = 0; j < i ; j++) {
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
291 free(ptl_mait->countries[j].pf_ptl_mai);
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
292 @@ -1276,7 +1276,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
293 for (j = 0; j < ((ptl_mait->nr_of_vtss + 1) * 8); j++) {
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
294 B2N_16(pf_temp[j]);
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
295 }
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
296 - ptl_mait->countries[i].pf_ptl_mai = (pf_level_t *)malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
297 + ptl_mait->countries[i].pf_ptl_mai = malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
298 if(!ptl_mait->countries[i].pf_ptl_mai) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
299 free(pf_temp);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
300 for(j = 0; j < i ; j++) {
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
301 @@ -1340,7 +1340,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
302 if(!DVDFileSeek_(ifofile->file, offset))
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
303 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
304
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
305 - vts_tmapt = (vts_tmapt_t *)malloc(sizeof(vts_tmapt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
306 + vts_tmapt = malloc(sizeof(vts_tmapt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
307 if(!vts_tmapt)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
308 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
309
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
310 @@ -1362,7 +1362,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
311
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
312 info_length = vts_tmapt->nr_of_tmaps * 4;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
313
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
314 - vts_tmap_srp = (uint32_t *)malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
315 + vts_tmap_srp = malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
316 if(!vts_tmap_srp) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
317 free(vts_tmapt);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
318 ifofile->vts_tmapt = NULL;
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
319 @@ -1388,7 +1388,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
320
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
321 info_length = vts_tmapt->nr_of_tmaps * sizeof(vts_tmap_t);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
322
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
323 - vts_tmapt->tmap = (vts_tmap_t *)malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
324 + vts_tmapt->tmap = malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
325 if(!vts_tmapt->tmap) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
326 free(vts_tmap_srp);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
327 free(vts_tmapt);
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
328 @@ -1422,7 +1422,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
329
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
330 info_length = vts_tmapt->tmap[i].nr_of_entries * sizeof(map_ent_t);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
331
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
332 - vts_tmapt->tmap[i].map_ent = (map_ent_t *)malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
333 + vts_tmapt->tmap[i].map_ent = malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
334 if(!vts_tmapt->tmap[i].map_ent) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
335 ifoFree_VTS_TMAPT(ifofile);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
336 return 0;
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
337 @@ -1472,7 +1472,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
338 if(ifofile->vtsi_mat->vts_c_adt == 0) /* mandatory */
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
339 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
340
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
341 - ifofile->vts_c_adt = (c_adt_t *)malloc(sizeof(c_adt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
342 + ifofile->vts_c_adt = malloc(sizeof(c_adt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
343 if(!ifofile->vts_c_adt)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
344 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
345
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
346 @@ -1504,7 +1504,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
347 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
348 }
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
349
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
350 - ifofile->menu_c_adt = (c_adt_t *)malloc(sizeof(c_adt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
351 + ifofile->menu_c_adt = malloc(sizeof(c_adt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
352 if(!ifofile->menu_c_adt)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
353 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
354
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
355 @@ -1548,7 +1548,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
356 c_adt->nr_of_vobs = info_length / sizeof(cell_adr_t);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
357 }
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
358
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
359 - c_adt->cell_adr_table = (cell_adr_t *)malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
360 + c_adt->cell_adr_table = malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
361 if(!c_adt->cell_adr_table)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
362 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
363
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
364 @@ -1608,7 +1608,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
365 if(ifofile->vtsi_mat->vts_vobu_admap == 0) /* mandatory */
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
366 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
367
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
368 - ifofile->vts_vobu_admap = (vobu_admap_t *)malloc(sizeof(vobu_admap_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
369 + ifofile->vts_vobu_admap = malloc(sizeof(vobu_admap_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
370 if(!ifofile->vts_vobu_admap)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
371 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
372
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
373 @@ -1640,7 +1640,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
374 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
375 }
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
376
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
377 - ifofile->menu_vobu_admap = (vobu_admap_t *)malloc(sizeof(vobu_admap_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
378 + ifofile->menu_vobu_admap = malloc(sizeof(vobu_admap_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
379 if(!ifofile->menu_vobu_admap)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
380 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
381
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
382 @@ -1673,7 +1673,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
383 Titles with a VOBS that has no VOBUs. */
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
384 CHECK_VALUE(info_length % sizeof(uint32_t) == 0);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
385
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
386 - vobu_admap->vobu_start_sectors = (uint32_t *)malloc(info_length);
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
387 + vobu_admap->vobu_start_sectors = malloc(info_length);
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
388 if(!vobu_admap->vobu_start_sectors) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
389 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
390 }
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
391 @@ -1725,7 +1725,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
392 if(ifofile->vtsi_mat->vts_pgcit == 0) /* mandatory */
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
393 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
394
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
395 - ifofile->vts_pgcit = (pgcit_t *)malloc(sizeof(pgcit_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
396 + ifofile->vts_pgcit = malloc(sizeof(pgcit_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
397 if(!ifofile->vts_pgcit)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
398 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
399
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
400 @@ -1860,7 +1860,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
401 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
402 }
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
403
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
404 - ifofile->pgci_ut = (pgci_ut_t *)malloc(sizeof(pgci_ut_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
405 + ifofile->pgci_ut = malloc(sizeof(pgci_ut_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
406 if(!ifofile->pgci_ut)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
407 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
408
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
409 @@ -2050,7 +2050,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
410 if(!DVDFileSeek_(ifofile->file, sector * DVD_BLOCK_LEN))
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
411 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
412
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
413 - vts_atrt = (vts_atrt_t *)malloc(sizeof(vts_atrt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
414 + vts_atrt = malloc(sizeof(vts_atrt_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
415 if(!vts_atrt)
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
416 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
417
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
418 @@ -2072,7 +2072,7 @@
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
419 VTS_ATRT_SIZE < vts_atrt->last_byte + 1);
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
420
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
421 info_length = vts_atrt->nr_of_vtss * sizeof(uint32_t);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
422 - data = (uint32_t *)malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
423 + data = malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
424 if(!data) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
425 free(vts_atrt);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
426 ifofile->vts_atrt = 0;
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
427 @@ -2094,7 +2094,7 @@
20790
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
428 }
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
429
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
430 info_length = vts_atrt->nr_of_vtss * sizeof(vts_attributes_t);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
431 - vts_atrt->vts = (vts_attributes_t *)malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
432 + vts_atrt->vts = malloc(info_length);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
433 if(!vts_atrt->vts) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
434 free(data);
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
435 free(vts_atrt);
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
436 @@ -2150,7 +2150,7 @@
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
437 ifofile->vmgi_mat->txtdt_mgi * DVD_BLOCK_LEN))
20790
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 - txtdt_mgi = (txtdt_mgi_t *)malloc(sizeof(txtdt_mgi_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
441 + txtdt_mgi = malloc(sizeof(txtdt_mgi_t));
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
442 if(!txtdt_mgi) {
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
443 return 0;
94c424e7974f Update for malloc cast changes.
diego
parents: 20787
diff changeset
444 }
16659
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
445
15875
50960b929dd0 update mplayer specific libdvdread diff to match v0.9.4
aurel
parents: 15535
diff changeset
446 --- 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
447 +++ dvdread/ifo_types.h 2005-06-23 00:19:10.000000000 +0200
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
448 @@ -403,6 +407,55 @@
16659
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
449 } ATTRIBUTE_PACKED user_ops_t;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
450
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
451 /**
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
452 + * Subpicture stream mapping for a subtitle
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
453 + */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
454 +typedef struct {
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
455 +#ifdef WORDS_BIGENDIAN
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
456 + unsigned int present : 1;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
457 + unsigned int zero1 : 2;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
458 + 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
459 +
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
460 + unsigned int zero2 : 3;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
461 + 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
462 +
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
463 + unsigned int zero3 : 3;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
464 + 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
465 +
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
466 + unsigned int zero4 : 3;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
467 + 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
468 +#else
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
469 + 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
470 + unsigned int zero1 : 2;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
471 + unsigned int present : 1;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
472 +
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
473 + 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
474 + unsigned int zero2 : 3;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
475 +
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
476 + 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
477 + unsigned int zero3 : 3;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
478 +
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
479 + 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
480 + unsigned int zero4 : 3;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
481 +#endif
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
482 +} ATTRIBUTE_PACKED subp_mapping_t;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
483 +
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
484 +/**
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
485 + * Audio stream mapping for a soundtrack
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
486 + */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
487 +typedef struct {
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
488 +#ifdef WORDS_BIGENDIAN
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
489 + unsigned int present : 1;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
490 + unsigned int zero1 : 4;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
491 + unsigned int s_audio : 3;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
492 +#else
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
493 + unsigned int s_audio : 3;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
494 + unsigned int zero1 : 4;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
495 + unsigned int present : 1;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
496 +#endif
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
497 + uint8_t zero2;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
498 +} ATTRIBUTE_PACKED audio_mapping_t;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
499 +
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
500 +/**
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
501 * Program Chain Information.
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
502 */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
503 typedef struct {
24054
6e218aef8e05 Sync local diff with current version.
diego
parents: 21592
diff changeset
504 @@ -411,8 +464,8 @@
16659
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
505 uint8_t nr_of_cells;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
506 dvd_time_t playback_time;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
507 user_ops_t prohibited_ops;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
508 - uint16_t audio_control[8]; /* New type? */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
509 - uint32_t subp_control[32]; /* New type? */
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
510 + audio_mapping_t audio_control[8];
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
511 + subp_mapping_t subp_control[32];
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
512 uint16_t next_pgc_nr;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
513 uint16_t prev_pgc_nr;
f734c20de10a Add changes from last patch (stream mapping).
reimar
parents: 16510
diff changeset
514 uint16_t goup_pgc_nr;