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