Magellan Linux

Contents of /trunk/xine-lib/patches/xine-lib-1.1.1-format.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 153 - (show annotations) (download)
Tue May 8 20:52:56 2007 UTC (17 years ago) by niro
File size: 13521 byte(s)
-import

1 Removes some format warnings when using %ll format on 64-bit arches with 64-bit
2 integers.
3 Nothing really important but makes the compile cleaner.
4
5 Index: xine-lib-1.1.1/src/dxr3/dxr3_decode_spu.c
6 ===================================================================
7 --- xine-lib-1.1.1.orig/src/dxr3/dxr3_decode_spu.c
8 +++ xine-lib-1.1.1/src/dxr3/dxr3_decode_spu.c
9 @@ -519,7 +519,7 @@ static void dxr3_spudec_decode_data(spu_
10 uint32_t vpts32;
11
12 vpts = this->stream->metronom->got_spu_packet(this->stream->metronom, buf->pts);
13 - llprintf(LOG_PTS, "pts = %lld vpts = %lld\n", buf->pts, vpts);
14 + llprintf(LOG_PTS, "pts = %"PRId64" vpts = %"PRId64"\n", buf->pts, vpts);
15 vpts32 = vpts;
16 if (ioctl(this->fd_spu, EM8300_IOCTL_SPU_SETPTS, &vpts32))
17 xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
18 Index: xine-lib-1.1.1/src/dxr3/dxr3_decode_video.c
19 ===================================================================
20 --- xine-lib-1.1.1.orig/src/dxr3/dxr3_decode_video.c
21 +++ xine-lib-1.1.1/src/dxr3/dxr3_decode_video.c
22 @@ -583,7 +583,7 @@ static void dxr3_decode_data(video_decod
23
24 delay = vpts - this->class->clock->get_current_time(
25 this->class->clock);
26 - llprintf(LOG_PTS, "SETPTS got %lld\n", vpts);
27 + llprintf(LOG_PTS, "SETPTS got %"PRId64"\n", vpts);
28 /* SETPTS only if less then one second in the future and
29 * either buffer has pts or sync_every_frame is set */
30 if ((delay > 0) && (delay < 90000) &&
31 @@ -597,13 +597,13 @@ static void dxr3_decode_data(video_decod
32
33 if (delay >= 90000) /* frame more than 1 sec ahead */
34 xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
35 - "dxr3_decode_video: WARNING: vpts %lld is %.02f seconds ahead of time!\n",
36 + "dxr3_decode_video: WARNING: vpts %"PRId64" is %.02f seconds ahead of time!\n",
37 vpts, delay/90000.0);
38 if (delay < 0)
39 xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "dxr3_decode_video: WARNING: overdue frame.\n");
40 }
41 else if (buf->pts)
42 - llprintf(LOG_PTS, "skip buf->pts = %lld (no vpts)\n", buf->pts);
43 + llprintf(LOG_PTS, "skip buf->pts = %"PRId64" (no vpts)\n", buf->pts);
44
45 /* now write the content to the dxr3 mpeg device and, in a dramatic
46 * break with open source tradition, check the return value
47 Index: xine-lib-1.1.1/src/xine-engine/load_plugins.c
48 ===================================================================
49 --- xine-lib-1.1.1.orig/src/xine-engine/load_plugins.c
50 +++ xine-lib-1.1.1/src/xine-engine/load_plugins.c
51 @@ -794,8 +794,8 @@ static void save_plugin_list(FILE *fp, x
52
53 file = node->file;
54 fprintf(fp, "[%s]\n", file->filename );
55 - fprintf(fp, "size=%llu\n", (uint64_t) file->filesize );
56 - fprintf(fp, "mtime=%llu\n", (uint64_t) file->filemtime );
57 + fprintf(fp, "size=%"PRIu64"\n", (uint64_t) file->filesize );
58 + fprintf(fp, "mtime=%"PRIu64"\n", (uint64_t) file->filemtime );
59 fprintf(fp, "type=%d\n", node->info->type );
60 fprintf(fp, "api=%d\n", node->info->API );
61 fprintf(fp, "id=%s\n", node->info->id );
62 @@ -913,10 +913,10 @@ static void load_plugin_list(FILE *fp, x
63 }
64 } else if (node) {
65 if( !strcmp("size",line) ) {
66 - sscanf(value," %llu",&llu);
67 + sscanf(value," %"PRIu64,&llu);
68 file->filesize = (off_t) llu;
69 } else if( !strcmp("mtime",line) ) {
70 - sscanf(value," %llu",&llu);
71 + sscanf(value," %"PRIu64,&llu);
72 file->filemtime = (time_t) llu;
73 } else if( !strcmp("type",line) ) {
74 sscanf(value," %d",&i);
75 Index: xine-lib-1.1.1/src/xine-utils/memcpy.c
76 ===================================================================
77 --- xine-lib-1.1.1.orig/src/xine-utils/memcpy.c
78 +++ xine-lib-1.1.1/src/xine-utils/memcpy.c
79 @@ -526,7 +526,7 @@ void xine_probe_fast_memcpy(xine_t *xine
80 t = rdtsc(config_flags) - t;
81 memcpy_method[i].time = t;
82
83 - xprintf(xine, XINE_VERBOSITY_LOG, "\t%s : %lld\n", memcpy_method[i].name, t);
84 + xprintf(xine, XINE_VERBOSITY_LOG, "\t%s : %"PRId64"\n", memcpy_method[i].name, t);
85
86 if( best == 0 || t < memcpy_method[best].time )
87 best = i;
88 Index: xine-lib-1.1.1/src/demuxers/demux_avi.c
89 ===================================================================
90 --- xine-lib-1.1.1.orig/src/demuxers/demux_avi.c
91 +++ xine-lib-1.1.1/src/demuxers/demux_avi.c
92 @@ -2145,7 +2145,7 @@ static int demux_avi_seek_internal (demu
93 * position we've already found, so we won't be seeking though the
94 * file much at this point. */
95
96 - xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "video_pts = %lld\n", video_pts);
97 + xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "video_pts = %"PRId64"\n", video_pts);
98
99 /* FIXME ? */
100 audio_pts = 77777777;
101 Index: xine-lib-1.1.1/src/demuxers/demux_film.c
102 ===================================================================
103 --- xine-lib-1.1.1.orig/src/demuxers/demux_film.c
104 +++ xine-lib-1.1.1/src/demuxers/demux_film.c
105 @@ -311,7 +311,7 @@ static int open_film_file(demux_film_t *
106 if (film->sample_table[j].pts > largest_pts)
107 largest_pts = film->sample_table[j].pts;
108
109 - llprintf(DEBUG_FILM_LOAD, "sample %4d @ %8" PRIxMAX ", %8X bytes, %s, pts %lld, duration %lld%s\n",
110 + llprintf(DEBUG_FILM_LOAD, "sample %4d @ %8" PRIxMAX ", %8X bytes, %s, pts %"PRId64", duration %"PRId64"%s\n",
111 j,
112 (intmax_t)film->sample_table[j].sample_offset,
113 film->sample_table[j].sample_size,
114 @@ -473,7 +473,7 @@ static int demux_film_send_chunk(demux_p
115 if (!remaining_sample_bytes)
116 buf->decoder_flags |= BUF_FLAG_FRAME_END;
117
118 - llprintf(DEBUG_FILM_DEMUX, "sending video buf with %d bytes, %lld pts, %d duration\n",
119 + llprintf(DEBUG_FILM_DEMUX, "sending video buf with %d bytes, %"PRId64" pts, %d duration\n",
120 buf->size, buf->pts, buf->decoder_info[0]);
121 this->video_fifo->put(this->video_fifo, buf);
122 }
123 @@ -517,7 +517,7 @@ static int demux_film_send_chunk(demux_p
124 if (!remaining_sample_bytes)
125 buf->decoder_flags |= BUF_FLAG_FRAME_END;
126
127 - llprintf(DEBUG_FILM_DEMUX, "sending video buf with %d bytes, %lld pts, %d duration\n",
128 + llprintf(DEBUG_FILM_DEMUX, "sending video buf with %d bytes, %"PRId64" pts, %d duration\n",
129 buf->size, buf->pts, buf->decoder_info[0]);
130 this->video_fifo->put(this->video_fifo, buf);
131 }
132 @@ -577,7 +577,7 @@ static int demux_film_send_chunk(demux_p
133 if (!remaining_sample_bytes)
134 buf->decoder_flags |= BUF_FLAG_FRAME_END;
135
136 - llprintf(DEBUG_FILM_DEMUX, "sending mono audio buf with %d bytes, %lld pts, %d duration\n",
137 + llprintf(DEBUG_FILM_DEMUX, "sending mono audio buf with %d bytes, %"PRId64" pts, %d duration\n",
138 buf->size, buf->pts, buf->decoder_info[0]);
139 this->audio_fifo->put(this->audio_fifo, buf);
140
141 @@ -648,7 +648,7 @@ static int demux_film_send_chunk(demux_p
142 if (!remaining_sample_bytes)
143 buf->decoder_flags |= BUF_FLAG_FRAME_END;
144
145 - llprintf(DEBUG_FILM_DEMUX, "sending stereo audio buf with %d bytes, %lld pts, %d duration\n",
146 + llprintf(DEBUG_FILM_DEMUX, "sending stereo audio buf with %d bytes, %"PRId64" pts, %d duration\n",
147 buf->size, buf->pts, buf->decoder_info[0]);
148 this->audio_fifo->put(this->audio_fifo, buf);
149 }
150 Index: xine-lib-1.1.1/src/demuxers/demux_iff.c
151 ===================================================================
152 --- xine-lib-1.1.1.orig/src/demuxers/demux_iff.c
153 +++ xine-lib-1.1.1/src/demuxers/demux_iff.c
154 @@ -927,7 +927,7 @@ static int demux_iff_send_chunk(demux_pl
155 buf->decoder_flags |= BUF_FLAG_FRAME_END;
156
157 xprintf (this->stream->xine, XINE_VERBOSITY_LOG,
158 - "sending audio buf with %d bytes, %lld pts, %d duration\n",
159 + "sending audio buf with %d bytes, %"PRId64" pts, %d duration\n",
160 buf->size, buf->pts, buf->decoder_info[0]);
161 this->audio_fifo->put(this->audio_fifo, buf);
162 }
163 Index: xine-lib-1.1.1/src/demuxers/demux_matroska.c
164 ===================================================================
165 --- xine-lib-1.1.1.orig/src/demuxers/demux_matroska.c
166 +++ xine-lib-1.1.1/src/demuxers/demux_matroska.c
167 @@ -1672,7 +1672,7 @@ static int parse_block (demux_matroska_t
168
169 if (!find_track_by_id(this, (int)track_num, &track)) {
170 xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
171 - "demux_matroska: invalid track id: %lld\n", track_num);
172 + "demux_matroska: invalid track id: %"PRId64"\n", track_num);
173 return 0;
174 }
175
176 Index: xine-lib-1.1.1/src/demuxers/demux_slave.c
177 ===================================================================
178 --- xine-lib-1.1.1.orig/src/demuxers/demux_slave.c
179 +++ xine-lib-1.1.1/src/demuxers/demux_slave.c
180 @@ -123,7 +123,7 @@ static int demux_slave_next (demux_slave
181 int64_t disc_off; /* discontinuity offset */
182 uint32_t decoder_flags; /* stuff like keyframe, is_header ... see below */
183
184 - if( sscanf(s,"fifo=%10s size=%d type=%u pts=%lld disc=%lld flags=%u",
185 + if( sscanf(s,"fifo=%10s size=%d type=%u pts=%"PRId64" disc=%"PRId64" flags=%u",
186 fifo_name, &size, &type, &pts, &disc_off, &decoder_flags) != 6 ) {
187 lprintf("'buffer' command error\n");
188 this->status = DEMUX_FINISHED;
189 Index: xine-lib-1.1.1/src/demuxers/ebml.c
190 ===================================================================
191 --- xine-lib-1.1.1.orig/src/demuxers/ebml.c
192 +++ xine-lib-1.1.1/src/demuxers/ebml.c
193 @@ -231,7 +231,7 @@ int ebml_read_uint(ebml_parser_t *ebml,
194
195 if ((elem->len < 1) || (elem->len > 8)) {
196 xprintf(ebml->xine, XINE_VERBOSITY_LOG,
197 - "ebml: Invalid integer element size %lld\n", size);
198 + "ebml: Invalid integer element size %"PRId64"\n", size);
199 return 0;
200 }
201
202 @@ -253,7 +253,7 @@ int ebml_read_sint (ebml_parser_t *ebml,
203
204 if ((elem->len < 1) || (elem->len > 8)) {
205 xprintf(ebml->xine, XINE_VERBOSITY_LOG,
206 - "ebml: Invalid integer element size %lld\n", size);
207 + "ebml: Invalid integer element size %"PRId64"\n", size);
208 return 0;
209 }
210
211 @@ -281,7 +281,7 @@ int ebml_read_float (ebml_parser_t *ebml
212
213 if ((size != 4) && (size != 8) && (size != 10)) {
214 xprintf(ebml->xine, XINE_VERBOSITY_LOG,
215 - "ebml: Invalid float element size %lld\n", size);
216 + "ebml: Invalid float element size %"PRId64"\n", size);
217 return 0;
218 }
219
220 Index: xine-lib-1.1.1/src/input/input_dvb.c
221 ===================================================================
222 --- xine-lib-1.1.1.orig/src/input/input_dvb.c
223 +++ xine-lib-1.1.1/src/input/input_dvb.c
224 @@ -2406,7 +2406,7 @@ static off_t dvb_plugin_read (input_plug
225 return 0;
226 dvb_event_handler (this);
227 xprintf(this->class->xine,XINE_VERBOSITY_DEBUG,
228 - "input_dvb: reading %lld bytes...\n", len);
229 + "input_dvb: reading %"PRId64" bytes...\n", len);
230
231 #ifndef DVB_NO_BUFFERING
232 nbc_check_buffers (this->nbc);
233 @@ -2459,7 +2459,7 @@ static off_t dvb_plugin_read (input_plug
234 }
235
236 xprintf(this->class->xine,XINE_VERBOSITY_DEBUG,
237 - "input_dvb: got %lld bytes (%lld/%lld bytes read)\n",
238 + "input_dvb: got %"PRId64" bytes (%"PRId64"/%"PRId64" bytes read)\n",
239 n, total,len);
240
241 if (n > 0){
242 @@ -2517,7 +2517,7 @@ static off_t dvb_plugin_seek (input_plug
243
244 dvb_input_plugin_t *this = (dvb_input_plugin_t *) this_gen;
245
246 - xprintf(this->class->xine,XINE_VERBOSITY_DEBUG,"seek %lld bytes, origin %d\n", offset, origin);
247 + xprintf(this->class->xine,XINE_VERBOSITY_DEBUG,"seek %"PRId64" bytes, origin %d\n", offset, origin);
248
249 /* only relative forward-seeking is implemented */
250
251 Index: xine-lib-1.1.1/src/input/input_pvr.c
252 ===================================================================
253 --- xine-lib-1.1.1.orig/src/input/input_pvr.c
254 +++ xine-lib-1.1.1/src/input/input_pvr.c
255 @@ -646,7 +646,7 @@ static int pvr_rec_file(pvr_input_plugin
256 pos = (off_t)(this->rec_blk - this->page_block[this->rec_page]) * PVR_BLOCK_SIZE;
257 if( lseek (this->rec_fd, pos, SEEK_SET) != pos ) {
258 xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
259 - "input_pvr: error setting position for writing %lld\n", pos);
260 + "input_pvr: error setting position for writing %"PRId64"\n", pos);
261 return 0;
262 }
263 if( this->rec_fd != -1 ) {
264 @@ -772,7 +772,7 @@ static int pvr_play_file(pvr_input_plugi
265 pos = (off_t)(this->play_blk - this->page_block[this->play_page]) * PVR_BLOCK_SIZE;
266 if( lseek (this->play_fd, pos, SEEK_SET) != pos ) {
267 xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
268 - "input_pvr: error setting position for reading %lld\n", pos);
269 + "input_pvr: error setting position for reading %"PRId64"\n", pos);
270 return 0;
271 }
272 if( read(this->play_fd, buffer, PVR_BLOCK_SIZE) < PVR_BLOCK_SIZE ) {
273 Index: xine-lib-1.1.1/src/input/net_buf_ctrl.c
274 ===================================================================
275 --- xine-lib-1.1.1.orig/src/input/net_buf_ctrl.c
276 +++ xine-lib-1.1.1/src/input/net_buf_ctrl.c
277 @@ -121,8 +121,8 @@ static void display_stats (nbc_t *this)
278 char *buffering[2] = {" ", "buf"};
279 char *enabled[2] = {"off", "on "};
280
281 - printf("net_buf_ctrl: vid %3d%% %4.1fs %4lldkbps %1d, "\
282 - "aud %3d%% %4.1fs %4lldkbps %1d, %s %s\r",
283 + printf("net_buf_ctrl: vid %3d%% %4.1fs %4"PRId64"kbps %1d, "\
284 + "aud %3d%% %4.1fs %4"PRId64"kbps %1d, %s %s\r",
285 this->video_fifo_fill,
286 (float)(this->video_fifo_length / 1000),
287 this->video_br / 1000,