summaryrefslogtreecommitdiff
blob: 09590ac1e9a0564791a7c449ec6556d84db00e6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
diff -urN xine-lib-1.0.orig/src/libw32dll/wine/ext.c xine-lib-1.0/src/libw32dll/wine/ext.c
--- xine-lib-1.0.orig/src/libw32dll/wine/ext.c	2004-09-22 03:35:56.000000000 +0800
+++ xine-lib-1.0/src/libw32dll/wine/ext.c	2005-04-21 00:01:10.000000000 +0800
@@ -469,7 +469,7 @@
 
     if (type&MEM_RESERVE && (unsigned)address&0xffff) {
        size += (unsigned)address&0xffff;
-       (unsigned)address &= ~0xffff;
+       address = (unsigned)address & (~0xffff);
     }
     pgsz = sysconf(_SC_PAGESIZE);
     if (type&MEM_COMMIT && (unsigned)address%pgsz) {
diff -urN xine-lib-1.0.orig/src/libw32dll/wine/win32.c xine-lib-1.0/src/libw32dll/wine/win32.c
--- xine-lib-1.0.orig/src/libw32dll/wine/win32.c	2004-11-25 05:43:59.000000000 +0800
+++ xine-lib-1.0/src/libw32dll/wine/win32.c	2005-04-21 00:01:10.000000000 +0800
@@ -2623,7 +2623,7 @@
     dbgprintf("GetWindowThreadProcessId(0x%x, 0x%x) => %d\n",
 	win, pid_data, tid);
     if (pid_data)
-	(int)*pid_data = tid;
+	*pid_data = tid;
     return tid;
 }
 
diff -urN xine-lib-1.0.orig/src/libxineadec/nosefart/nes_apu.c xine-lib-1.0/src/libxineadec/nosefart/nes_apu.c
--- xine-lib-1.0.orig/src/libxineadec/nosefart/nes_apu.c	2004-12-12 14:55:59.000000000 +0800
+++ xine-lib-1.0/src/libxineadec/nosefart/nes_apu.c	2005-04-21 00:01:13.000000000 +0800
@@ -1012,9 +1012,15 @@
 
       /* signed 16-bit output, unsigned 8-bit */
       if (16 == apu->sample_bits)
-         *((int16 *) buffer)++ = (int16) accum;
+      {
+         *((int16 *) buffer) = (int16) accum;
+	  buffer += sizeof(int16);
+      }
       else
-         *((uint8 *) buffer)++ = (accum >> 8) ^ 0x80;
+      {
+         *((uint8 *) buffer) = (accum >> 8) ^ 0x80;
+	  buffer += sizeof(int8);
+      }
    }
 
    /* resync cycle counter */
diff -urN xine-lib-1.0.orig/src/xine-engine/post.c xine-lib-1.0/src/xine-engine/post.c
--- xine-lib-1.0.orig/src/xine-engine/post.c	2004-10-18 03:14:30.000000000 +0800
+++ xine-lib-1.0/src/xine-engine/post.c	2005-04-21 00:01:07.000000000 +0800
@@ -238,20 +238,26 @@
   
   if (input) {
     *input = (post_in_t *)xine_xmalloc(sizeof(post_in_t));
+    xine_video_port_t **video_port;
     if (!*input) return port;
     (*input)->xine_in.name = "video in";
     (*input)->xine_in.type = XINE_POST_DATA_VIDEO;
-    (xine_video_port_t *)(*input)->xine_in.data = &port->new_port;
+    video_port = &(*input)->xine_in.data;  
+    *video_port = &port->new_port;
     (*input)->post = post;
     xine_list_append_content(post->input, *input);
   }
   
   if (output) {
+    xine_video_port_t ***video_port;
     *output = (post_out_t *)xine_xmalloc(sizeof(post_out_t));
     if (!*output) return port;
     (*output)->xine_out.name = "video out";
     (*output)->xine_out.type = XINE_POST_DATA_VIDEO;
-    (xine_video_port_t **)(*output)->xine_out.data = &port->original_port;
+    video_port = &(*output) ->xine_out.data;
+    /*(xine_video_port_t **)(*output)->xine_out.data = &port->original_port;*/
+    video_port = &(*output)->xine_out.data;
+    *video_port = &port->original_port; 
     (*output)->xine_out.rewire = post_video_rewire;
     (*output)->post = post;
     (*output)->user_data = port;
@@ -714,21 +720,27 @@
   pthread_mutex_init(&port->usage_lock, NULL);
   
   if (input) {
+    xine_audio_port_t **audio_port;
     *input = (post_in_t *)xine_xmalloc(sizeof(post_in_t));
     if (!*input) return port;
     (*input)->xine_in.name = "audio in";
     (*input)->xine_in.type = XINE_POST_DATA_AUDIO;
-    (xine_audio_port_t *)(*input)->xine_in.data = &port->new_port;
+    /*(xine_audio_port_t *)(*input)->xine_in.data = &port->new_port;*/
+    audio_port =  &(*input)->xine_in.data;
+    *audio_port = &port->new_port; 
     (*input)->post = post;
     xine_list_append_content(post->input, *input);
   }
   
   if (output) {
+    xine_audio_port_t ***audio_port;
     *output = (post_out_t *)xine_xmalloc(sizeof(post_out_t));
     if (!*output) return port;
     (*output)->xine_out.name = "audio out";
     (*output)->xine_out.type = XINE_POST_DATA_AUDIO;
-    (xine_audio_port_t **)(*output)->xine_out.data = &port->original_port;
+    /*(xine_audio_port_t **)(*output)->xine_out.data = &port->original_port;*/
+    audio_port = &(*output)->xine_out.data;
+    *audio_port = &port->original_port; 
     (*output)->xine_out.rewire = post_audio_rewire;
     (*output)->post = post;
     (*output)->user_data = port;
diff -urN xine-lib-1.0.orig/src/xine-utils/color.c xine-lib-1.0/src/xine-utils/color.c
--- xine-lib-1.0.orig/src/xine-utils/color.c	2003-12-09 08:02:38.000000000 +0800
+++ xine-lib-1.0/src/xine-utils/color.c	2005-04-21 00:01:11.000000000 +0800
@@ -495,8 +495,10 @@
 
   /* process blocks of 4 pixels */
   for (x=0; x < (width / 4); x++) {
-    n1  = *(((unsigned int *) src1)++);
-    n2  = *(((unsigned int *) src2)++);
+    n1  = *(((unsigned int *) src1));
+    n2  = *(((unsigned int *) src2));
+    src1 += sizeof(unsigned int);
+    src2 += sizeof(unsigned int);
     n3  = (n1 & 0xFF00FF00) >> 8;
     n4  = (n2 & 0xFF00FF00) >> 8;
     n1 &= 0x00FF00FF;
diff -urN xine-lib-1.0.orig/src/xine-utils/memcpy.c xine-lib-1.0/src/xine-utils/memcpy.c
--- xine-lib-1.0.orig/src/xine-utils/memcpy.c	2004-12-21 05:22:22.000000000 +0800
+++ xine-lib-1.0/src/xine-utils/memcpy.c	2005-04-21 00:01:11.000000000 +0800
@@ -218,8 +218,8 @@
         "movntps %%xmm2, 32(%1)\n"
         "movntps %%xmm3, 48(%1)\n"
         :: "r" (from), "r" (to) : "memory");
-        ((const unsigned char *)from)+=64;
-        ((unsigned char *)to)+=64;
+        from = (const unsigned char*) from + 64;
+        to = (unsigned char *)to + 64;
       }
     else
       /*
@@ -241,8 +241,8 @@
         "movntps %%xmm2, 32(%1)\n"
         "movntps %%xmm3, 48(%1)\n"
         :: "r" (from), "r" (to) : "memory");
-        ((const unsigned char *)from)+=64;
-        ((unsigned char *)to)+=64;
+        from = (const unsigned char *)from + 64;
+        to = (unsigned char *)to + 64;
       }
     /* since movntq is weakly-ordered, a "sfence"
      * is needed to become ordered again. */
@@ -296,8 +296,8 @@
       "movq %%mm6, 48(%1)\n"
       "movq %%mm7, 56(%1)\n"
       :: "r" (from), "r" (to) : "memory");
-      ((const unsigned char *)from)+=64;
-      ((unsigned char *)to)+=64;
+      from = ((const unsigned char *)from) + 64;
+      to = ((unsigned char *)to) + 64;
     }
     __asm__ __volatile__ ("emms":::"memory");
   }
@@ -363,8 +363,8 @@
       "movntq %%mm6, 48(%1)\n"
       "movntq %%mm7, 56(%1)\n"
       :: "r" (from), "r" (to) : "memory");
-      ((const unsigned char *)from)+=64;
-      ((unsigned char *)to)+=64;
+      from = ((const unsigned char *)from)+64;
+      to = ((unsigned char *)to)+64;
     }
      /* since movntq is weakly-ordered, a "sfence"
      * is needed to become ordered again. */
diff -urN xine-lib-1.0.orig/src/post/audio/stretch.c xine-lib-1.0/src/post/audio/stretch.c
--- xine-lib-1.0.orig/src/post/audio/stretch.c	2004-10-30 07:11:38.000000000 +0800
+++ xine-lib-1.0/src/post/audio/stretch.c	2005-04-21 00:01:04.000000000 +0800
@@ -476,7 +476,7 @@
     memcpy( outbuf->mem, data_out, 
             outbuf->num_frames * this->bytes_per_frame );
     num_frames_out -= outbuf->num_frames;
-    (uint8_t *)data_out += outbuf->num_frames * this->bytes_per_frame;
+    data_out = (uint8_t *)data_out + outbuf->num_frames * this->bytes_per_frame;
                 
     outbuf->vpts        = this->pts;
     this->pts           = 0;
@@ -587,7 +587,7 @@
     memcpy( (uint8_t *)this->audiofrag + this->num_frames * this->bytes_per_frame,
             data_in, frames_to_copy * this->bytes_per_frame );
     
-    (uint8_t *)data_in += frames_to_copy * this->bytes_per_frame;
+    data_in = (uint8_t *)data_in + frames_to_copy * this->bytes_per_frame;
     this->num_frames += frames_to_copy;
     buf->num_frames -= frames_to_copy;