annotate libdvdread/libdvdread_changes.diff @ 27912:73c7a62c1d35

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