[MPlayer-dev-eng] [PATCH] massive attack! mp_msg printf format warnings

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Sun Sep 21 22:23:39 CEST 2003


On Wednesday, 17 September 2003, Dominik 'Rathann' Mierzejewski wrote:
[...] 
> No, actually I think you're right. I'll try post an updated patch tonight
> or tomorrow. No other comments?

OK, it took me a while longer, but here it is.

-- 
MPlayer RPMs maintainer: http://www.piorunek.pl/~dominik/linux/pkgs/mplayer/
"The Universe doesn't give you any points for doing things that are easy."
        -- Sheridan to Garibaldi in Babylon 5:"The Geometry of Shadows"
-------------- next part --------------
--- mplayer-20030921/libaf/af_resample.c.printf	Sun Jan 12 09:05:51 2003
+++ mplayer-20030921/libaf/af_resample.c	Sun Sep 21 22:01:35 2003
@@ -199,7 +199,7 @@
     if((s->setup & RSMP_MASK) == RSMP_LIN){
       s->pt=0LL;
       s->step=((uint64_t)n->rate<<STEPACCURACY)/(uint64_t)af->data->rate+1LL;
-      af_msg(AF_MSG_DEBUG0,"[resample] Linear interpolation step: 0x%016X.\n",
+      af_msg(AF_MSG_DEBUG0,"[resample] Linear interpolation step: 0x%016llX.\n",
 	     s->step);
       af->mul.n = af->data->rate;
       af->mul.d = n->rate;
--- mplayer-20030921/libmpcodecs/native/qtrpza.c.printf	Thu Nov  7 00:54:25 2002
+++ mplayer-20030921/libmpcodecs/native/qtrpza.c	Sun Sep 21 22:01:35 2003
@@ -253,7 +253,7 @@
 			/* Unknown opcode */
 			default:
 				mp_msg(MSGT_DECVIDEO, MSGL_HINT, "Unknown opcode %d in rpza chunk."
-							 " Skip remaining %lu bytes of chunk data.\n", opcode,
+							 " Skip remaining %u bytes of chunk data.\n", opcode,
 							 chunk_size - stream_ptr);
 				return;
 		} /* Opcode switch */
--- mplayer-20030921/libmpcodecs/ad_hwac3.c.printf	Mon Apr 28 18:17:26 2003
+++ mplayer-20030921/libmpcodecs/ad_hwac3.c	Sun Sep 21 22:01:35 2003
@@ -287,7 +287,7 @@
     *nblks != 128 &&
     ftype == 1) 
   {
-    mp_msg(MSGT_DECAUDIO, MSGL_ERR, "DTS: nblks %d not valid for normal frame, REPORT BUG\n", nblks);
+    mp_msg(MSGT_DECAUDIO, MSGL_ERR, "DTS: nblks %d not valid for normal frame, REPORT BUG\n", *nblks);
     return -1;
   }
   
--- mplayer-20030921/libmpcodecs/ad_faad.c.printf	Sun Sep 21 21:17:48 2003
+++ mplayer-20030921/libmpcodecs/ad_faad.c	Sun Sep 21 22:01:35 2003
@@ -115,7 +115,7 @@
     return 0;
   } else {
     mp_msg(MSGT_DECAUDIO,MSGL_V,"FAAD: Decoder init done (%dBytes)!\n", sh->a_in_buffer_len); // XXX: remove or move to debug!
-    mp_msg(MSGT_DECAUDIO,MSGL_V,"FAAD: Negotiated samplerate: %dHz  channels: %d\n", faac_samplerate, faac_channels);
+    mp_msg(MSGT_DECAUDIO,MSGL_V,"FAAD: Negotiated samplerate: %ldHz  channels: %d\n", faac_samplerate, faac_channels);
     sh->channels = faac_channels;
     sh->samplerate = faac_samplerate;
     //sh->o_bps = sh->samplesize*faac_channels*faac_samplerate;
@@ -213,7 +213,7 @@
       mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"FAAD: Decoded zero samples!\n");
     } else {
       /* XXX: samples already multiplied by channels! */
-      mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"FAAD: Successfully decoded frame (%d Bytes)!\n",
+      mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"FAAD: Successfully decoded frame (%ld Bytes)!\n",
       sh->samplesize*faac_finfo.samples);
       memcpy(buf+len,faac_sample_buffer, sh->samplesize*faac_finfo.samples);
       len += sh->samplesize*faac_finfo.samples;
--- mplayer-20030921/libmpcodecs/ad_realaud.c.printf	Sun Aug 17 23:18:02 2003
+++ mplayer-20030921/libmpcodecs/ad_realaud.c	Sun Sep 21 22:01:35 2003
@@ -346,7 +346,7 @@
     else
 #endif
     prop=raGetFlavorProperty(sh->context,((short*)(sh->wf+1))[2],0,&len);
-    mp_msg(MSGT_DECAUDIO,MSGL_INFO,"Audio codec: [%d] %s\n",((short*)(sh->wf+1))[2],prop);
+    mp_msg(MSGT_DECAUDIO,MSGL_INFO,"Audio codec: [%d] %s\n",((short*)(sh->wf+1))[2],(char *)prop);
 
 #ifdef USE_WIN32DLL
     if (dll_type == 1)
--- mplayer-20030921/libmpcodecs/vf.c.printf	Sat Sep 13 23:54:15 2003
+++ mplayer-20030921/libmpcodecs/vf.c	Sun Sep 21 22:01:35 2003
@@ -326,7 +326,7 @@
 		  (mpi->flags&MP_IMGFLAG_YUV)?"YUV":((mpi->flags&MP_IMGFLAG_SWAPPED)?"BGR":"RGB"),
 		  (mpi->flags&MP_IMGFLAG_PLANAR)?"planar":"packed",
 	          mpi->bpp*mpi->width*mpi->height/8);
-	    mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"(imgfmt: %x, planes: %x,%x,%x strides: %d,%d,%d, chroma: %dx%d, shift: h:%d,v:%d)\n",
+	    mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"(imgfmt: %x, planes: %p,%p,%p strides: %d,%d,%d, chroma: %dx%d, shift: h:%d,v:%d)\n",
 		mpi->imgfmt, mpi->planes[0], mpi->planes[1], mpi->planes[2],
 		mpi->stride[0], mpi->stride[1], mpi->stride[2],
 		mpi->chroma_width, mpi->chroma_height, mpi->chroma_x_shift, mpi->chroma_y_shift);
--- mplayer-20030921/libmpcodecs/vd_lcl.c.printf	Fri Jan 17 22:44:58 2003
+++ mplayer-20030921/libmpcodecs/vd_lcl.c	Sun Sep 21 22:01:35 2003
@@ -430,7 +430,7 @@
               return 0;
             }
             if (mthread_outlen != (unsigned int)(hc->zstream.total_out)) {
-              mp_msg(MSGT_DECVIDEO, MSGL_WARN, "[LCL] ZLIB: mthread1 decoded size differs (%d != %d)\n",
+              mp_msg(MSGT_DECVIDEO, MSGL_WARN, "[LCL] ZLIB: mthread1 decoded size differs (%d != %ld)\n",
                      mthread_outlen, hc->zstream.total_out);
             }
             zret = inflateReset(&(hc->zstream));
@@ -448,7 +448,7 @@
               return 0;
             }
             if ((hc->decomp_size - mthread_outlen) != (unsigned int)(hc->zstream.total_out)) {
-              mp_msg(MSGT_DECVIDEO, MSGL_WARN, "[LCL] ZLIB: mthread2 decoded size differs (%d != %d)\n",
+              mp_msg(MSGT_DECVIDEO, MSGL_WARN, "[LCL] ZLIB: mthread2 decoded size differs (%d != %ld)\n",
                      hc->decomp_size - mthread_outlen, hc->zstream.total_out);
             }
           } else {
@@ -462,7 +462,7 @@
               return 0;
             }
             if (hc->decomp_size != (unsigned int)(hc->zstream.total_out)) {
-              mp_msg(MSGT_DECVIDEO, MSGL_WARN, "[LCL] ZLIB: decoded size differs (%d != %d)\n",
+              mp_msg(MSGT_DECVIDEO, MSGL_WARN, "[LCL] ZLIB: decoded size differs (%d != %ld)\n",
                      hc->decomp_size, hc->zstream.total_out);
             }
           }
--- mplayer-20030921/libmpcodecs/vd_xanim.c.printf	Thu Jul  3 22:22:51 2003
+++ mplayer-20030921/libmpcodecs/vd_xanim.c	Sun Sep 21 22:01:35 2003
@@ -258,27 +258,27 @@
 	return(0);
     }
     
-    mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "Exported functions by codec: [functable: 0x%08x entries: %d]\n",
+    mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "Exported functions by codec: [functable: %p entries: %d]\n",
 	mod_hdr->funcs, mod_hdr->num_funcs);
     for (i = 0; i < (int)mod_hdr->num_funcs; i++)
     {
-	mp_msg(MSGT_DECVIDEO, MSGL_DBG2, " %d: %d %d [iq:0x%08x d:0x%08x]\n",
+	mp_msg(MSGT_DECVIDEO, MSGL_DBG2, " %d: %d %d [iq:%p d:%p]\n",
 		i, func[i].what, func[i].id, func[i].iq_func, func[i].dec_func);
 	if (func[i].what & XAVID_AVI_QUERY)
 	{
-	    mp_msg(MSGT_DECVIDEO, MSGL_DBG2, " 0x%08x: avi init/query func (id: %d)\n",
+	    mp_msg(MSGT_DECVIDEO, MSGL_DBG2, " %p: avi init/query func (id: %d)\n",
 		func[i].iq_func, func[i].id);
 	    priv->iq_func = (void *)func[i].iq_func;
 	}
 	if (func[i].what & XAVID_QT_QUERY)
 	{
-	    mp_msg(MSGT_DECVIDEO, MSGL_DBG2, " 0x%08x: qt init/query func (id: %d)\n",
+	    mp_msg(MSGT_DECVIDEO, MSGL_DBG2, " %p: qt init/query func (id: %d)\n",
 		func[i].iq_func, func[i].id);
 	    priv->iq_func = (void *)func[i].iq_func;
 	}
 	if (func[i].what & XAVID_DEC_FUNC)
 	{
-	    mp_msg(MSGT_DECVIDEO, MSGL_DBG2, " 0x%08x: decoder func (init/query: 0x%08x) (id: %d)\n",
+	    mp_msg(MSGT_DECVIDEO, MSGL_DBG2, " %p: decoder func (init/query: %p) (id: %d)\n",
 		func[i].dec_func, func[i].iq_func, func[i].id);
 	    priv->dec_func = (void *)func[i].dec_func;
 	}
@@ -306,7 +306,7 @@
     {
 	case CODEC_SUPPORTED:
 	    priv->dec_func = (void *)codec_hdr->decoder;
-	    mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "Codec is supported: found decoder for %s at 0x%08x\n",
+	    mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "Codec is supported: found decoder for %s at %p\n",
 		codec_hdr->description, codec_hdr->decoder);
 	    return(1);
 	case CODEC_UNSUPPORTED:
@@ -720,8 +720,8 @@
     priv->decinfo->xs = priv->decinfo->ys = 0;
     priv->decinfo->special = 0;
     priv->decinfo->extra = codec_hdr.extra;
-    mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "decinfo->extra, filled by codec: 0x%08x [%s]\n",
-	&priv->decinfo->extra, priv->decinfo->extra);
+    mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "decinfo->extra, filled by codec: %p [%s]\n",
+	&priv->decinfo->extra, (char *)priv->decinfo->extra);
 
     return(1);
 }
--- mplayer-20030921/libmpdemux/cache2.c.printf	Mon Jun  9 14:15:45 2003
+++ mplayer-20030921/libmpdemux/cache2.c	Sun Sep 21 22:01:35 2003
@@ -119,7 +119,11 @@
   
   if(read<s->min_filepos || read>s->max_filepos){
       // seek...
+#ifdef _LARGEFILE_SOURCE
+      mp_msg(MSGT_CACHE,MSGL_DBG2,"Out of boundaries... seeking to 0x%llX  \n",read);
+#else
       mp_msg(MSGT_CACHE,MSGL_DBG2,"Out of boundaries... seeking to 0x%X  \n",read);
+#endif
       // streaming: drop cache contents only if seeking backward or too much fwd:
       if(s->stream->type!=STREAMTYPE_STREAM ||
           read<s->min_filepos || read>=s->max_filepos+s->buffer_size)
@@ -263,13 +267,25 @@
     stream->cache_pid = CreateThread(NULL,0,ThreadProc,s,0,&threadId);
 #endif
     // wait until cache is filled at least prefill_init %
+#ifdef _LARGEFILE_SOURCE
+    mp_msg(MSGT_CACHE,MSGL_V,"CACHE_PRE_INIT: %lld [%lld] %lld  pre:%d  eof:%d  \n",
+	s->min_filepos,s->read_filepos,s->max_filepos,min,s->eof);
+#else
     mp_msg(MSGT_CACHE,MSGL_V,"CACHE_PRE_INIT: %d [%d] %d  pre:%d  eof:%d  \n",
 	s->min_filepos,s->read_filepos,s->max_filepos,min,s->eof);
+#endif
     while(s->read_filepos<s->min_filepos || s->max_filepos-s->read_filepos<min){
+#ifdef _LARGEFILE_SOURCE
+	mp_msg(MSGT_CACHE,MSGL_STATUS,"\rCache fill: %5.2f%% (%lld bytes)    ",
+	    100.0*(float)(s->max_filepos-s->read_filepos)/(float)(s->buffer_size),
+	    s->max_filepos-s->read_filepos
+	);
+#else
 	mp_msg(MSGT_CACHE,MSGL_STATUS,"\rCache fill: %5.2f%% (%d bytes)    ",
 	    100.0*(float)(s->max_filepos-s->read_filepos)/(float)(s->buffer_size),
 	    s->max_filepos-s->read_filepos
 	);
+#endif
 	if(s->eof) break; // file is smaller than prefill size
 	if(mp_input_check_interrupt(PREFILL_SLEEP_TIME))
 	  return 0;
@@ -321,7 +337,11 @@
   s=stream->cache_data;
 //  s->seek_lock=1;
   
+#ifdef _LARGEFILE_SOURCE 
+  mp_msg(MSGT_CACHE,MSGL_DBG2,"CACHE2_SEEK: 0x%llX <= 0x%llX (0x%llX) <= 0x%llX  \n",s->min_filepos,pos,s->read_filepos,s->max_filepos);
+#else
   mp_msg(MSGT_CACHE,MSGL_DBG2,"CACHE2_SEEK: 0x%X <= 0x%X (0x%X) <= 0x%X  \n",s->min_filepos,(int)pos,s->read_filepos,s->max_filepos);
+#endif
 
   newpos=pos/s->sector_size; newpos*=s->sector_size; // align
   stream->pos=s->read_filepos=newpos;
--- mplayer-20030921/libmpdemux/asfheader.c.printf	Sat May 17 14:24:01 2003
+++ mplayer-20030921/libmpdemux/asfheader.c	Sun Sep 21 22:01:35 2003
@@ -158,7 +158,11 @@
 	mp_msg(MSGT_HEADER,MSGL_V,"stream concealment: %s\n",asf_chunk_type(streamh.concealment));
 	mp_msg(MSGT_HEADER,MSGL_V,"type: %d bytes,  stream: %d bytes  ID: %d\n",(int)streamh.type_size,(int)streamh.stream_size,(int)streamh.stream_no);
 	mp_msg(MSGT_HEADER,MSGL_V,"unk1: %lX  unk2: %X\n",(unsigned long)streamh.unk1,(unsigned int)streamh.unk2);
+#ifdef _LARGEFILE_SOURCE 
+	mp_msg(MSGT_HEADER,MSGL_V,"FILEPOS=0x%llX\n",stream_tell(demuxer->stream));
+#else
 	mp_msg(MSGT_HEADER,MSGL_V,"FILEPOS=0x%X\n",stream_tell(demuxer->stream));
+#endif
       }
       if(streamh.type_size>2048 || streamh.stream_size>2048){
           mp_msg(MSGT_HEADER,MSGL_FATAL,"FATAL: header size bigger than 2048 bytes (%d,%d)!\n"
--- mplayer-20030921/libmpdemux/aviheader.c.printf	Fri Nov  1 18:46:43 2002
+++ mplayer-20030921/libmpdemux/aviheader.c	Sun Sep 21 22:01:35 2003
@@ -248,8 +248,13 @@
     if(index_mode){
       int i;
       priv->idx_size=size2>>4;
-      mp_msg(MSGT_HEADER,MSGL_V,"Reading INDEX block, %d chunks for %ld frames (fpos=%p)\n",
+#ifdef _LARGEFILE_SOURCE 
+      mp_msg(MSGT_HEADER,MSGL_V,"Reading INDEX block, %d chunks for %d frames (fpos=%#llx)\n",
         priv->idx_size,avih.dwTotalFrames, stream_tell(demuxer->stream));
+#else
+      mp_msg(MSGT_HEADER,MSGL_V,"Reading INDEX block, %d chunks for %d frames (fpos=%#lx)\n",
+        priv->idx_size,avih.dwTotalFrames, stream_tell(demuxer->stream));
+#endif
       priv->idx=malloc(priv->idx_size<<4);
 //      printf("\nindex to %p !!!!! (priv=%p)\n",priv->idx,priv);
       stream_read(demuxer->stream,(char*)priv->idx,priv->idx_size<<4);
@@ -288,7 +293,7 @@
   }
   mp_msg(MSGT_HEADER,MSGL_DBG2,"list_end=0x%X  pos=0x%X  chunksize=0x%X  next=0x%X\n",
       (int)list_end, (int)stream_tell(demuxer->stream),
-      chunksize, (int)chunksize+stream_tell(demuxer->stream));
+      chunksize, (int)chunksize+(int)stream_tell(demuxer->stream));
   if(list_end>0 && chunksize+stream_tell(demuxer->stream)>list_end){
       mp_msg(MSGT_HEADER,MSGL_V,"Broken chunk?  chunksize=%d  (id=%.4s)\n",chunksize,(char *) &id);
       stream_seek(demuxer->stream,list_end);
--- mplayer-20030921/libmpdemux/demux_asf.c.printf	Sat Sep 13 23:54:15 2003
+++ mplayer-20030921/libmpdemux/demux_asf.c	Sun Sep 21 22:01:35 2003
@@ -340,7 +340,11 @@
             return 1; // success
     }
     
+#ifdef _LARGEFILE_SOURCE 
+    mp_msg(MSGT_DEMUX,MSGL_V,"%08llX:  UNKNOWN TYPE  %02X %02X %02X %02X %02X...\n",demux->filepos,asf_packet[0],asf_packet[1],asf_packet[2],asf_packet[3],asf_packet[4]);
+#else
     mp_msg(MSGT_DEMUX,MSGL_V,"%08X:  UNKNOWN TYPE  %02X %02X %02X %02X %02X...\n",demux->filepos,asf_packet[0],asf_packet[1],asf_packet[2],asf_packet[3],asf_packet[4]);
+#endif
     return 0;
 }
 
--- mplayer-20030921/libmpdemux/demux_avi.c.printf	Sat Aug 30 20:00:41 2003
+++ mplayer-20030921/libmpdemux/demux_avi.c	Sun Sep 21 22:01:35 2003
@@ -215,7 +215,11 @@
 
     pos = priv->idx_offset + (unsigned long)idx->dwChunkOffset;
     if((pos<demux->movi_start || pos>=demux->movi_end) && (demux->movi_end>demux->movi_start) && (demux->stream->type!=STREAMTYPE_STREAM)){
+#ifdef _LARGEFILE_SOURCE 
+      mp_msg(MSGT_DEMUX,MSGL_V,"ChunkOffset out of range!   idx=0x%llX  \n",pos);
+#else
       mp_msg(MSGT_DEMUX,MSGL_V,"ChunkOffset out of range!   idx=0x%X  \n",pos);
+#endif
       continue;
     }
 #if 0
@@ -239,7 +243,7 @@
 //    if((len&(~1))!=(idx->dwChunkLength&(~1))){
 //    if((len)!=(idx->dwChunkLength)){
     if((len!=idx->dwChunkLength)&&((len+1)!=idx->dwChunkLength)){
-      mp_msg(MSGT_DEMUX,MSGL_V,"ChunkSize mismatch! raw=%d idx=%ld  \n",len,idx->dwChunkLength);
+      mp_msg(MSGT_DEMUX,MSGL_V,"ChunkSize mismatch! raw=%d idx=%d  \n",len,idx->dwChunkLength);
       if(len>0x200000 && idx->dwChunkLength>0x200000) continue; // both values bad :(
       len=choose_chunk_len(idx->dwChunkLength,len);
     }
@@ -327,7 +331,11 @@
 
     pos = priv->idx_offset+(unsigned long)idx->dwChunkOffset;
     if((pos<demux->movi_start || pos>=demux->movi_end) && (demux->movi_end>demux->movi_start)){
+#ifdef _LARGEFILE_SOURCE 
+      mp_msg(MSGT_DEMUX,MSGL_V,"ChunkOffset out of range!  current=0x%llX  idx=0x%llX  \n",demux->filepos,pos);
+#else
       mp_msg(MSGT_DEMUX,MSGL_V,"ChunkOffset out of range!  current=0x%X  idx=0x%X  \n",demux->filepos,pos);
+#endif
       continue;
     }
 #if 0
@@ -350,7 +358,7 @@
     }
     len=stream_read_dword_le(demux->stream);
     if((len!=idx->dwChunkLength)&&((len+1)!=idx->dwChunkLength)){
-      mp_msg(MSGT_DEMUX,MSGL_V,"ChunkSize mismatch! raw=%d idx=%ld  \n",len,idx->dwChunkLength);
+      mp_msg(MSGT_DEMUX,MSGL_V,"ChunkSize mismatch! raw=%d idx=%d  \n",len,idx->dwChunkLength);
       if(len>0x200000 && idx->dwChunkLength>0x200000) continue; // both values bad :(
       len=choose_chunk_len(idx->dwChunkLength,len);
     }
@@ -567,7 +575,7 @@
 	asamples+=(len+priv->audio_block_size-1)/priv->audio_block_size;
       }
     }
-    mp_msg(MSGT_DEMUX,MSGL_V,"AVI video size=%lu (%lu) audio size=%lu (%lu)\n",vsize,vsamples,asize,asamples);
+    mp_msg(MSGT_DEMUX,MSGL_V,"AVI video size=%u (%u) audio size=%u (%u)\n",vsize,vsamples,asize,asamples);
     priv->numberofframes=vsamples;
     sh_video->i_bps=((float)vsize/(float)vsamples)*(float)sh_video->video.dwRate/(float)sh_video->video.dwScale;
     if(sh_audio) sh_audio->i_bps=((float)asize/(float)asamples)*(float)sh_audio->audio.dwRate/(float)sh_audio->audio.dwScale;
@@ -594,11 +602,11 @@
       }
     }
     vsize=demuxer->movi_end-demuxer->movi_start-asize-8*priv->numberofframes;
-    mp_msg(MSGT_DEMUX,MSGL_V,"AVI video size=%lu (%lu)  audio size=%lu\n",vsize,priv->numberofframes,asize);
+    mp_msg(MSGT_DEMUX,MSGL_V,"AVI video size=%u (%u)  audio size=%u\n",vsize,priv->numberofframes,asize);
     sh_video->i_bps=(float)vsize/(sh_video->frametime*priv->numberofframes);
   }
 
-  mp_msg(MSGT_DEMUX,MSGL_INFO,"VIDEO:  [%.4s]  %ldx%ld  %dbpp  %5.3f fps  %5.1f kbps (%4.1f kbyte/s)\n",
+  mp_msg(MSGT_DEMUX,MSGL_INFO,"VIDEO:  [%.4s]  %dx%d  %dbpp  %5.3f fps  %5.1f kbps (%4.1f kbyte/s)\n",
     (char *)&sh_video->bih->biCompression,
     sh_video->bih->biWidth,
     sh_video->bih->biHeight,
--- mplayer-20030921/libmpdemux/demux_mov.c.printf	Sun Sep 21 21:17:48 2003
+++ mplayer-20030921/libmpdemux/demux_mov.c	Sun Sep 21 22:01:35 2003
@@ -333,7 +333,7 @@
      	      break;
 	    default:
 	      tmp = be2me_32(tmp);  
-	      mp_msg(MSGT_DEMUX,MSGL_WARN,"MOV: File-Type unknown Major-Brand: %.4s\n",&tmp);
+	      mp_msg(MSGT_DEMUX,MSGL_WARN,"MOV: File-Type unknown Major-Brand: %.4s\n",(char *)&tmp);
 	  }
 	  mp_msg(MSGT_DEMUX,MSGL_V,"MOV: File-Type Minor-Version: %d\n",
 	      stream_read_dword(demuxer->stream));
@@ -341,7 +341,7 @@
 	  // List all compatible brands
 	  for(i = 0; i < ((len-16)/4); i++) {
 	    tmp = be2me_32(stream_read_dword(demuxer->stream));
-	    mp_msg(MSGT_DEMUX,MSGL_V,"MOV: File-Type Compatible-Brands #%d: %.4s\n",i,&tmp);
+	    mp_msg(MSGT_DEMUX,MSGL_V,"MOV: File-Type Compatible-Brands #%d: %.4s\n",i,(char *)&tmp);
 	    skipped += 4;
 	  }
 #endif	  
@@ -351,8 +351,13 @@
 	  mp_msg(MSGT_DEMUX,MSGL_V,"MOV: Movie header found!\n");
 	  priv->moov_start=(off_t)stream_tell(demuxer->stream);
 	  priv->moov_end=(off_t)priv->moov_start+len-skipped;
+#ifdef _LARGEFILE_SOURCE 
+	  mp_msg(MSGT_DEMUX,MSGL_DBG2,"MOV: Movie header: start: %llx end: %llx\n",
+	    priv->moov_start, priv->moov_end);
+#else
 	  mp_msg(MSGT_DEMUX,MSGL_DBG2,"MOV: Movie header: start: %x end: %x\n",
 	    priv->moov_start, priv->moov_end);
+#endif
 	  skipped+=8;
 	  i = stream_read_dword(demuxer->stream)-8;
 	  if(stream_read_dword(demuxer->stream)==MOV_FOURCC('r','m','r','a')){
@@ -415,8 +420,13 @@
 	  mp_msg(MSGT_DEMUX,MSGL_V,"MOV: Movie DATA found!\n");
 	  priv->mdat_start=stream_tell(demuxer->stream);
 	  priv->mdat_end=priv->mdat_start+len-skipped;
+#ifdef _LARGEFILE_SOURCE 
+	  mp_msg(MSGT_DEMUX,MSGL_DBG2,"MOV: Movie data: start: %llx end: %llx\n",
+	    priv->mdat_start, priv->mdat_end);
+#else
 	  mp_msg(MSGT_DEMUX,MSGL_DBG2,"MOV: Movie data: start: %x end: %x\n",
 	    priv->mdat_start, priv->mdat_end);
+#endif
 	  flags|=2;
 	  if(flags==3){
 	    // if we're over the headers, then we can stop parsing here!
@@ -427,7 +437,11 @@
 	case MOV_FOURCC('f','r','e','e'):
 	case MOV_FOURCC('s','k','i','p'):
 	case MOV_FOURCC('j','u','n','k'):
+#ifdef _LARGEFILE_SOURCE 
+	  mp_msg(MSGT_DEMUX,MSGL_DBG2,"MOV: free space (len: %lld)\n", len);
+#else
 	  mp_msg(MSGT_DEMUX,MSGL_DBG2,"MOV: free space (len: %d)\n", len);
+#endif
 	  /* unused, if you edit a mov, you can use space provided by free atoms (redefining it) */
 	  break;
 	case MOV_FOURCC('p','n','o','t'):
@@ -437,7 +451,7 @@
 	default:
 	  if(no==0){ free(priv); return 0;} // first chunk is bad!
 	  id = be2me_32(id);
-	  mp_msg(MSGT_DEMUX,MSGL_V,"MOV: unknown chunk: %.4s %d\n",&id,(int)len);
+	  mp_msg(MSGT_DEMUX,MSGL_V,"MOV: unknown chunk: %.4s %d\n",(char *)&id,(int)len);
 	}
 skip_chunk:
 	if(!stream_skip(demuxer->stream,len-skipped)) break;
@@ -478,7 +492,7 @@
 	len-=8;
 	id=stream_read_dword(demuxer->stream);
 	//
-	mp_msg(MSGT_DEMUX,MSGL_DBG2,"lschunks %.4s  %d\n",&id,(int)len);
+	mp_msg(MSGT_DEMUX,MSGL_DBG2,"lschunks %.4s  %d\n",(char *)&id,(int)len);
 	//
 	if(trak){
 	  switch(id){
@@ -556,7 +570,7 @@
 		char* str=malloc(len+1);
 		stream_read(demuxer->stream,str,len);
 		str[len]=0;
-		mp_msg(MSGT_DEMUX,MSGL_V,"MOV: %*sHandler header: %.4s/%.4s (%.4s) %s\n",level,"",&type,&subtype,&manufact,str);
+		mp_msg(MSGT_DEMUX,MSGL_V,"MOV: %*sHandler header: %.4s/%.4s (%.4s) %s\n",level,"",(char *)&type,(char *)&subtype,(char *)&manufact,str);
 		free(str);
 		switch(bswap_32(type)){
 		case MOV_FOURCC('m','h','l','r'):
@@ -564,7 +578,7 @@
 		case MOV_FOURCC('d','h','l','r'):
 		    trak->data_handler=bswap_32(subtype); break;
 		default:
-		    mp_msg(MSGT_DEMUX,MSGL_V,"MOV: unknown handler class: 0x%X (%.4s)\n",bswap_32(type),&type);
+		    mp_msg(MSGT_DEMUX,MSGL_V,"MOV: unknown handler class: 0x%X (%.4s)\n",bswap_32(type),(char *)&type);
 		}
 		break;
 	    }
@@ -599,7 +613,11 @@
 		    off_t len=stream_read_dword(demuxer->stream);
 		    unsigned int fourcc=stream_read_dword_le(demuxer->stream);
 		    if(len<8) break; // error
-		    mp_msg(MSGT_DEMUX,MSGL_V,"MOV: %*s desc #%d: %.4s  (%d bytes)\n",level,"",i,&fourcc,len-16);
+#ifdef _LARGEFILE_SOURCE 
+		    mp_msg(MSGT_DEMUX,MSGL_V,"MOV: %*s desc #%d: %.4s  (%lld bytes)\n",level,"",i,(char *)&fourcc,len-16);
+#else
+		    mp_msg(MSGT_DEMUX,MSGL_V,"MOV: %*s desc #%d: %.4s  (%d bytes)\n",level,"",i,(char *)&fourcc,len-16);
+#endif
 		    if(fourcc!=trak->fourcc && i)
 			mp_msg(MSGT_DEMUX,MSGL_WARN,MSGTR_MOVvariableFourCC);
 //		    if(!i)
@@ -638,7 +656,7 @@
 		int ver = (temp << 24);
 		int flags = (temp << 16)|(temp<<8)|temp;
 		int i;
-		mp_msg(MSGT_DEMUX,MSGL_V,"MOV: %*sSample->Chunk mapping table!  (%d blocks) (ver:%d,flags:%ld)\n",
+		mp_msg(MSGT_DEMUX,MSGL_V,"MOV: %*sSample->Chunk mapping table!  (%d blocks) (ver:%d,flags:%d)\n",
 		    level,"",len,ver,flags);
 		// read data:
 		trak->chunkmap_size=len;
@@ -658,7 +676,7 @@
 		int entries=stream_read_dword(demuxer->stream);
 		int i;
 		
-		mp_msg(MSGT_DEMUX,MSGL_V,"MOV: %*sSample size table! (entries=%d ss=%d) (ver:%d,flags:%ld)\n",
+		mp_msg(MSGT_DEMUX,MSGL_V,"MOV: %*sSample size table! (entries=%d ss=%d) (ver:%d,flags:%d)\n",
 		    level,"",entries,ss,ver,flags);
 		trak->samplesize=ss;
 		if (!ss) {
@@ -713,7 +731,7 @@
 		int ver = (temp << 24);
 		int flags = (temp << 16)|(temp<<8)|temp;
 		int i;
-		mp_msg(MSGT_DEMUX, MSGL_V,"MOV: %*sSyncing samples (keyframes) table! (%d entries) (ver:%d,flags:%ld)\n",
+		mp_msg(MSGT_DEMUX, MSGL_V,"MOV: %*sSyncing samples (keyframes) table! (%d entries) (ver:%d,flags:%d)\n",
 		    level, "",entries, ver, flags);
 		trak->keyframes_size=entries;
 		trak->keyframes=malloc(sizeof(unsigned int)*entries);
@@ -749,7 +767,7 @@
 		int flags = (temp << 16)|(temp<<8)|temp;
 		int i;
 	
-		mp_msg(MSGT_DEMUX, MSGL_V,"MOV: %*sEdit list table (%d entries) (ver:%d,flags:%ld)\n",
+		mp_msg(MSGT_DEMUX, MSGL_V,"MOV: %*sEdit list table (%d entries) (ver:%d,flags:%d)\n",
 		    level, "",entries, ver, flags);
 #if 1
 		trak->editlist_size=entries;
@@ -775,7 +793,7 @@
 	    }
 	    default:
 		id = be2me_32(id);
-		mp_msg(MSGT_DEMUX,MSGL_V,"MOV: unknown chunk: %.4s %d\n",&id,(int)len);
+		mp_msg(MSGT_DEMUX,MSGL_V,"MOV: unknown chunk: %.4s %d\n",(char *)&id,(int)len);
 		break;
 	  }//switch(id)
 	} else { /* not in track */
@@ -939,7 +957,7 @@
 			    atom_len);
 		    }
 		}  
-		mp_msg(MSGT_DEMUX, MSGL_INFO, "Fourcc: %.4s\n",&trak->fourcc);
+		mp_msg(MSGT_DEMUX, MSGL_INFO, "Fourcc: %.4s\n",(char *)&trak->fourcc);
 #if 0
 		{ FILE* f=fopen("stdata.dat","wb");
 		  fwrite(trak->stdata,trak->stdata_len,1,f);
@@ -1213,7 +1231,7 @@
 		mp_msg(MSGT_DEMUX, MSGL_INFO, "Display size: %d x %d\n",
 		    trak->tkdata[77]|(trak->tkdata[76]<<8),
 		    trak->tkdata[81]|(trak->tkdata[80]<<8));
-		mp_msg(MSGT_DEMUX, MSGL_INFO, "Fourcc: %.4s  Codec: '%.*s'\n",&trak->fourcc,trak->stdata[42]&31,trak->stdata+43);
+		mp_msg(MSGT_DEMUX, MSGL_INFO, "Fourcc: %.4s  Codec: '%.*s'\n",(char *)&trak->fourcc,trak->stdata[42]&31,trak->stdata+43);
 		
 //		if(demuxer->video->id==-1 || demuxer->video->id==priv->track_db){
 //		    // (auto)selected video track:
@@ -1294,7 +1312,7 @@
 	case MOV_FOURCC('d','c','o','m'): {
 //	    int temp=stream_read_dword(demuxer->stream);
 	    unsigned int algo=be2me_32(stream_read_dword(demuxer->stream));
-	    mp_msg(MSGT_DEMUX, MSGL_INFO, "Compressed header uses %.4s algo!\n",&algo);
+	    mp_msg(MSGT_DEMUX, MSGL_INFO, "Compressed header uses %.4s algo!\n",(char *)&algo);
 	    break;
 	}
 	case MOV_FOURCC('c','m','v','d'): {
@@ -1338,7 +1356,7 @@
 	      }
 #endif
 	      if(moov_sz != zstrm.total_out)
-	        mp_msg(MSGT_DEMUX, MSGL_WARN, "Warning! moov size differs cmov: %d  zlib: %d\n",moov_sz,zstrm.total_out);
+	        mp_msg(MSGT_DEMUX, MSGL_WARN, "Warning! moov size differs cmov: %d  zlib: %ld\n",moov_sz,zstrm.total_out);
 	      zret = inflateEnd(&zstrm);
 	      
 	      backup=demuxer->stream;
@@ -1366,7 +1384,11 @@
 		udta_len = stream_read_dword(demuxer->stream);
 		udta_id = stream_read_dword(demuxer->stream);
 		udta_size -= 8;
-		mp_msg(MSGT_DEMUX, MSGL_DBG2, "udta_id: %.4s (len: %d)\n", &udta_id, udta_len);
+#ifdef _LARGEFILE_SOURCE 
+		mp_msg(MSGT_DEMUX, MSGL_DBG2, "udta_id: %.4s (len: %lld)\n", (char *)&udta_id, udta_len);
+#else
+		mp_msg(MSGT_DEMUX, MSGL_DBG2, "udta_id: %.4s (len: %d)\n", (char *)&udta_id, udta_len);
+#endif
 		switch (udta_id)
 		{
 		    case MOV_FOURCC(0xa9,'c','p','y'):
@@ -1469,7 +1491,7 @@
 	} /* eof udta */
 	default:
 	  id = be2me_32(id);
-	  mp_msg(MSGT_DEMUX,MSGL_V,"MOV: unknown chunk: %.4s %d\n",&id,(int)len);
+	  mp_msg(MSGT_DEMUX,MSGL_V,"MOV: unknown chunk: %.4s %d\n",(char *)&id,(int)len);
 	} /* endof switch */
 	} /* endof else */
 
@@ -1491,8 +1513,13 @@
     stream_reset(demuxer->stream);
     if(!stream_seek(demuxer->stream,priv->moov_start))
     {
+#ifdef _LARGEFILE_SOURCE 
+	mp_msg(MSGT_DEMUX,MSGL_ERR,"MOV: Cannot seek to the beginning of the Movie header (0x%llx)\n",
+	    priv->moov_start);
+#else
 	mp_msg(MSGT_DEMUX,MSGL_ERR,"MOV: Cannot seek to the beginning of the Movie header (0x%x)\n",
 	    priv->moov_start);
+#endif
 	return 0;
     }
     lschunks(demuxer, 0, priv->moov_end, NULL);
@@ -1581,7 +1608,7 @@
 	                zret = inflateInit(&zstrm);
 			zret = inflate(&zstrm, Z_NO_FLUSH);
 			if(newlen != zstrm.total_out)
-	    		    mp_msg(MSGT_DEMUX, MSGL_WARN, "Warning! unzipped frame size differs hdr: %d  zlib: %d\n",newlen,zstrm.total_out);
+	    		    mp_msg(MSGT_DEMUX, MSGL_WARN, "Warning! unzipped frame size differs hdr: %d  zlib: %ld\n",newlen,zstrm.total_out);
 			
 			write(fd, buf2, newlen);
 		    } else {
--- mplayer-20030921/libmpdemux/demux_mpg.c.printf	Fri Apr  4 17:38:46 2003
+++ mplayer-20030921/libmpdemux/demux_mpg.c	Sun Sep 21 22:01:35 2003
@@ -306,7 +306,11 @@
   if(demux->synced==1){
     if(head==0x1BB || head==0x1BD || (head>=0x1C0 && head<=0x1EF)){
       demux->synced=2;
+#ifdef _LARGEFILE_SOURCE 
+      mp_msg(MSGT_DEMUX,MSGL_V,"system stream synced at 0x%llX (%lld)!\n",demux->filepos,demux->filepos);
+#else
       mp_msg(MSGT_DEMUX,MSGL_V,"system stream synced at 0x%X (%d)!\n",demux->filepos,demux->filepos);
+#endif
       num_elementary_packets100=0; // requires for re-sync!
       num_elementary_packets101=0; // requires for re-sync!
     } else demux->synced=0;
--- mplayer-20030921/libmpdemux/demux_ty.c.printf	Mon Jun  9 02:24:22 2003
+++ mplayer-20030921/libmpdemux/demux_ty.c	Sun Sep 21 22:01:35 2003
@@ -426,8 +426,13 @@
                if ( demux->stream->end_pos > TIVO_PART_LENGTH )
                {
                   numberParts = demux->stream->end_pos / TIVO_PART_LENGTH;
+#ifdef _LARGEFILE_SOURCE 
+                  mp_msg( MSGT_DEMUX, MSGL_DBG3, "ty:Number Parts %lld\n",
+                    numberParts );
+#else
                   mp_msg( MSGT_DEMUX, MSGL_DBG3, "ty:Number Parts %d\n",
                     numberParts );
+#endif
                   stream_seek( demux->stream, numberParts * TIVO_PART_LENGTH );
                   // mp_msg( MSGT_DEMUX, MSGL_DBG3, 
 				      //    "ty:Reading a chunk %d\n", __LINE__ );
--- mplayer-20030921/libmpdemux/demux_pva.c.printf	Sat Nov 23 11:58:08 2002
+++ mplayer-20030921/libmpdemux/demux_pva.c	Sun Sep 21 22:01:35 2003
@@ -326,7 +326,11 @@
 	{
 		if(stream_read_word(d->stream) != (('A'<<8)|'V'))
 		{
+#ifdef _LARGEFILE_SOURCE 
+			mp_msg(MSGT_DEMUX,MSGL_V,"demux_pva: pva_get_payload() missed a SyncWord at %lld!! Trying to sync...\n",stream_tell(d->stream));
+#else
 			mp_msg(MSGT_DEMUX,MSGL_V,"demux_pva: pva_get_payload() missed a SyncWord at %ld!! Trying to sync...\n",stream_tell(d->stream));
+#endif
 			if(!pva_sync(d))
 			{
 				if (!d->stream->eof)
@@ -350,7 +354,11 @@
 	flags=stream_read_char(d->stream);
 	payload->is_packet_start=flags & 0x10;
 	pack_size=le2me_16(stream_read_word(d->stream));
+#ifdef _LARGEFILE_SOURCE 
+	mp_msg(MSGT_DEMUX,MSGL_DBG2,"demux_pva::pva_get_payload(): pack_size=%u field read at offset %llu\n",pack_size,stream_tell(d->stream)-2);
+#else
 	mp_msg(MSGT_DEMUX,MSGL_DBG2,"demux_pva::pva_get_payload(): pack_size=%u field read at offset %lu\n",pack_size,stream_tell(d->stream)-2);
+#endif
 	pva_payload_start=stream_tell(d->stream);
 	next_offset=pva_payload_start+pack_size;
 
--- mplayer-20030921/libmpdemux/demux_viv.c.printf	Mon Apr 21 13:18:54 2003
+++ mplayer-20030921/libmpdemux/demux_viv.c	Sun Sep 21 22:01:35 2003
@@ -105,8 +105,13 @@
 	header_len -= strlen(token)+2;
 	if (sscanf(token, "%[^:]:%[^\n]", opt, param) != 2)
 	{
-	    mp_msg(MSGT_DEMUX, MSGL_V, "viv_text_header_parser: bad line: '%s' at ~%p\n",
+#ifdef _LARGEFILE_SOURCE 
+	    mp_msg(MSGT_DEMUX, MSGL_V, "viv_text_header_parser: bad line: '%s' at ~%#llx\n",
 		token, stream_tell(demux->stream));
+#else
+	    mp_msg(MSGT_DEMUX, MSGL_V, "viv_text_header_parser: bad line: '%s' at ~%#lx\n",
+		token, stream_tell(demux->stream));
+#endif
 	    break;
 	}
 	mp_dbg(MSGT_DEMUX, MSGL_DBG3, "token: '%s' (%d bytes/%d bytes left)\n",
@@ -356,8 +361,13 @@
       audio_pos+=len;
       break;
   default:
+#ifdef _LARGEFILE_SOURCE 
+      mp_msg(MSGT_DEMUX,MSGL_WARN,"VIVO - unknown ID found: %02X at pos %llu contact author!\n",
+        c, stream_tell(demux->stream));
+#else
       mp_msg(MSGT_DEMUX,MSGL_WARN,"VIVO - unknown ID found: %02X at pos %lu contact author!\n",
         c, stream_tell(demux->stream));
+#endif
       return 0;
   }
 
--- mplayer-20030921/libmpdemux/demuxer.c.printf	Sun Sep 21 21:17:48 2003
+++ mplayer-20030921/libmpdemux/demuxer.c	Sun Sep 21 22:01:35 2003
@@ -1183,7 +1183,7 @@
     } else {
       sh_video=d_video->sh;sh_video->ds=d_video;
       sh_video->fps=1000.0f; sh_video->frametime=0.001f; // 1ms
-      mp_msg(MSGT_DEMUXER,MSGL_INFO,"VIDEO:  [%.4s]  %ldx%ld  %dbpp\n",
+      mp_msg(MSGT_DEMUXER,MSGL_INFO,"VIDEO:  [%.4s]  %dx%d  %dbpp\n",
         (char *)&sh_video->bih->biCompression,
         sh_video->bih->biWidth,
         sh_video->bih->biHeight,
--- mplayer-20030921/libmpdemux/tvi_v4l.c.printf	Sat Sep 13 23:54:15 2003
+++ mplayer-20030921/libmpdemux/tvi_v4l.c	Sun Sep 21 22:01:35 2003
@@ -436,7 +436,7 @@
     priv->audio_skew_buffer = NULL;
 
     priv->video_fd = open(priv->video_device, O_RDWR);
-    mp_msg(MSGT_TV, MSGL_DBG2, "Video fd: %d, %x\n", priv->video_fd,
+    mp_msg(MSGT_TV, MSGL_DBG2, "Video fd: %d, %p\n", priv->video_fd,
 	priv->video_device);
     if (priv->video_fd == -1)
     {
--- mplayer-20030921/libmpdemux/demux_real.c.printf	Sat Sep 13 23:54:15 2003
+++ mplayer-20030921/libmpdemux/demux_real.c	Sun Sep 21 22:01:35 2003
@@ -850,7 +850,7 @@
 		tmp = stream_read_dword(demuxer->stream);
 		
 		mp_msg(MSGT_DEMUX,MSGL_DBG2,"demux_real: type_spec: len=%d  fpos=0x%X  first_dword=0x%X (%.4s)  \n",
-		    (int)codec_data_size,(int)codec_pos,tmp,&tmp);
+		    (int)codec_data_size,(int)codec_pos,tmp,(char *)&tmp);
 
 #if 1
 		// skip unknown shit - FIXME: find a better/cleaner way!
@@ -1197,7 +1197,7 @@
     if(demuxer->video->sh){
 	sh_video_t *sh=demuxer->video->sh;
 	mp_msg(MSGT_DEMUX,MSGL_INFO,"VIDEO:  %.4s [%08X,%08X]  %dx%d  (aspect %4.2f)  %4.2f fps\n",
-	    &sh->format,((unsigned int*)(sh->bih+1))[1],((unsigned int*)(sh->bih+1))[0],
+	    (char *)&sh->format,((unsigned int*)(sh->bih+1))[1],((unsigned int*)(sh->bih+1))[0],
 	    sh->disp_w,sh->disp_h,sh->aspect,sh->fps);
     }
 
--- mplayer-20030921/libmpdemux/demux_film.c.printf	Wed Apr 24 17:36:06 2002
+++ mplayer-20030921/libmpdemux/demux_film.c	Sun Sep 21 22:01:35 2003
@@ -227,7 +227,7 @@
   header_size -= 16;
 
   mp_msg(MSGT_DEMUX, MSGL_HINT, "FILM version %.4s\n",
-    &film_data->film_version);
+    (char *)&film_data->film_version);
 
   // skip to where the next chunk should be
   stream_skip(demuxer->stream, 4);
--- mplayer-20030921/libmpdemux/demux_audio.c.printf	Sun Sep 21 21:17:48 2003
+++ mplayer-20030921/libmpdemux/demux_audio.c	Sun Sep 21 22:01:35 2003
@@ -216,7 +216,11 @@
   if(stream_tell(s) != demuxer->movi_start)
     stream_seek(s,demuxer->movi_start);
 
+#ifdef _LARGEFILE_SOURCE 
+  mp_msg(MSGT_DEMUX,MSGL_V,"demux_audio: audio data 0x%llX - 0x%llX  \n",demuxer->movi_start,demuxer->movi_end);
+#else
   mp_msg(MSGT_DEMUX,MSGL_V,"demux_audio: audio data 0x%X - 0x%X  \n",demuxer->movi_start,demuxer->movi_end);
+#endif
 
   return 1;
 }
--- mplayer-20030921/libmpdemux/demux_ogg.c.printf	Sat Sep 13 23:54:15 2003
+++ mplayer-20030921/libmpdemux/demux_ogg.c	Sun Sep 21 22:01:35 2003
@@ -470,7 +470,7 @@
   while(1) {
     np = ogg_sync_pageseek(sync,page);
     if(np < 0) { // We had to skip some bytes
-      mp_msg(MSGT_DEMUX,MSGL_ERR,"Bad page sync while building syncpoints table (%ld)\n",-np);
+      mp_msg(MSGT_DEMUX,MSGL_ERR,"Bad page sync while building syncpoints table (%d)\n",-np);
       pos += -np;
       continue;
     }
@@ -509,7 +509,11 @@
     if(p > 1 || (p == 1 && ! ogg_page_continued(page)))
       last_pos = pos;
     pos += np;
-    mp_msg(MSGT_DEMUX,MSGL_INFO,"Building syncpoint table %d%\r",pos*100/s->end_pos);
+#ifdef _LARGEFILE_SOURCE 
+    mp_msg(MSGT_DEMUX,MSGL_INFO,"Building syncpoint table %lld%%\r",pos*100/s->end_pos);
+#else
+    mp_msg(MSGT_DEMUX,MSGL_INFO,"Building syncpoint table %d%%\r",pos*100/s->end_pos);
+#endif
   }
   mp_msg(MSGT_DEMUX,MSGL_INFO,"\n");
 
--- mplayer-20030921/libmpdemux/demux_ts.c.printf	Sun Sep 21 22:01:35 2003
+++ mplayer-20030921/libmpdemux/demux_ts.c	Sun Sep 21 22:19:31 2003
@@ -235,7 +235,11 @@
 		}
 	}
 
+#ifdef _LARGEFILE_SOURCE
 	mp_msg(MSGT_DEMUX, MSGL_V, "TRIED UP TO POSITION %llu, FOUND %x, packet_size= %d\n", pos, c, size);
+#else
+	mp_msg(MSGT_DEMUX, MSGL_V, "TRIED UP TO POSITION %u, FOUND %x, packet_size= %d\n", pos, c, size);
+#endif
 	stream_seek(demuxer->stream, pos);
 
 	if(! is_ts)
@@ -524,7 +528,7 @@
 	priv = malloc(sizeof(ts_priv_t));
 	if(priv == NULL)
 	{
-		mp_msg(MSGT_DEMUX, MSGL_FATAL, "DEMUX_OPEN_TS, couldn't allocate %lu bytes, exit\n",
+		mp_msg(MSGT_DEMUX, MSGL_FATAL, "DEMUX_OPEN_TS, couldn't allocate %u bytes, exit\n",
 			sizeof(ts_priv_t));
 		return NULL;
 	}
@@ -642,7 +646,7 @@
 	//uint32_t es_rate;
 
 	//Here we are always at the start of a PES packet
-	mp_msg(MSGT_DEMUX, MSGL_DBG2, "pes_parse2(%X, %d): \n", buf, packet_len);
+	mp_msg(MSGT_DEMUX, MSGL_DBG2, "pes_parse2(%p, %d): \n", buf, packet_len);
 
 	if(packet_len == 0)
 	{
@@ -1519,7 +1523,7 @@
 				else
 					tss->pts = tss->last_pts = es->pts;
 
-				mp_msg(MSGT_DEMUX, MSGL_DBG2, "ts_parse, NEW pid=%d, PSIZE: %u, type=%X, start=%X, len=%d\n",
+				mp_msg(MSGT_DEMUX, MSGL_DBG2, "ts_parse, NEW pid=%d, PSIZE: %u, type=%X, start=%p, len=%d\n",
 					es->pid, es->payload_size, es->type, es->start, es->size);
 
 				tss->payload_size = es->payload_size;
--- mplayer-20030921/libvo/vo_dga.c.printf	Mon Jul 28 16:54:19 2003
+++ mplayer-20030921/libvo/vo_dga.c	Sun Sep 21 22:01:35 2003
@@ -777,7 +777,7 @@
 
   // do some more checkings here ...
 
-  mp_msg(MSGT_VO, MSGL_V, "vo_dga: bytes/line: %d, screen res: %dx%d, depth: %d, base: %08x, bpp: %d\n", 
+  mp_msg(MSGT_VO, MSGL_V, "vo_dga: bytes/line: %d, screen res: %dx%d, depth: %d, base: %p, bpp: %d\n", 
           vo_dga_width, vo_dga_vp_width, 
           vo_dga_vp_height, HW_MODE.vdm_bytespp, vo_dga_base,
           HW_MODE.vdm_bitspp);
@@ -856,7 +856,7 @@
    vo_modelines=XDGAQueryModes(mDisplay, mScreen, &vo_modecount);
    if(vo_modelines){
      for(i=0; i< vo_modecount; i++){
-        mp_msg(MSGT_VO, MSGL_V, "vo_dga: (%03d) depth=%d, bpp=%d, r=%08x, g=%08x, b=%08x, %d x %d\n",
+        mp_msg(MSGT_VO, MSGL_V, "vo_dga: (%03d) depth=%d, bpp=%d, r=%08lx, g=%08lx, b=%08lx, %d x %d\n",
 	  	i,
 		vo_modelines[i].depth,
 		vo_modelines[i].bitsPerPixel,
--- mplayer-20030921/libvo/font_load_ft.c.printf	Mon Jun  9 14:15:47 2003
+++ mplayer-20030921/libvo/font_load_ft.c	Sun Sep 21 22:01:35 2003
@@ -173,8 +173,8 @@
 	else {
 	    glyph_index = FT_Get_Char_Index(face, uni_charmap ? character:code);
 	    if (glyph_index==0) {
-		WARNING("Glyph for char 0x%02x|U+%04X|%c not found.", code, character,
-			code<' '||code>255 ? '.':code);
+		WARNING("Glyph for char 0x%02lx|U+%04lX|%c not found.", code, character,
+			code<' '||code>255 ? '.':(char)code);
 		desc->font[unicode?character:code] = -1;
 		continue;
 	    }
--- mplayer-20030921/libvo/x11_common.c.printf	Sun Sep 21 21:17:49 2003
+++ mplayer-20030921/libvo/x11_common.c	Sun Sep 21 22:01:35 2003
@@ -148,7 +148,7 @@
     
     mp_msg(MSGT_VO,MSGL_ERR,"X11 error: %s\n", msg);
     
-    mp_msg(MSGT_VO,MSGL_V,"Type: %x, display: %x, resourceid: %x, serial: %x\n",
+    mp_msg(MSGT_VO,MSGL_V,"Type: %x, display: %p, resourceid: %lx, serial: %lx\n",
 	    event->type, event->display, event->resourceid, event->serial);
     mp_msg(MSGT_VO,MSGL_V,"Error code: %x, request code: %x, minor code: %x\n",
 	    event->error_code, event->request_code, event->minor_code);
@@ -891,7 +891,7 @@
     xev.format = 32;
     xev.data.l[0] = layer?fs_layer:orig_layer; // if not fullscreen, stay on default layer
     xev.data.l[1] = CurrentTime;
-    mp_msg( MSGT_VO,MSGL_V,"[x11] Layered style stay on top (layer %d).\n",xev.data.l[0] );
+    mp_msg( MSGT_VO,MSGL_V,"[x11] Layered style stay on top (layer %ld).\n",xev.data.l[0] );
     XSendEvent(mDisplay, mRootWin, False, SubstructureNotifyMask, (XEvent *) &xev);
   } else
  if ( vo_fs_type & vo_wm_NETWM )
@@ -1131,7 +1131,7 @@
 	return;
     }
     mp_msg(MSGT_VO,MSGL_INFO,
-           "xscreensaver_disable: xscreensaver wid=%d.\n", xs_windowid);
+           "xscreensaver_disable: xscreensaver wid=%ld.\n", xs_windowid);
 
     deactivate = XInternAtom(dpy, "DEACTIVATE", False);
     screensaver = XInternAtom(dpy, "SCREENSAVER", False);
@@ -1365,7 +1365,7 @@
 			   &nvisuals);
   if (visuals != NULL) {
     for (i = 0; i < nvisuals; i++) {
-      mp_msg(MSGT_VO,MSGL_V,"vo: X11 truecolor visual %#x, depth %d, R:%lX G:%lX B:%lX\n",
+      mp_msg(MSGT_VO,MSGL_V,"vo: X11 truecolor visual %#lx, depth %d, R:%lX G:%lX B:%lX\n",
 	       visuals[i].visualid, visuals[i].depth,
 	       visuals[i].red_mask, visuals[i].green_mask,
 	       visuals[i].blue_mask);
--- mplayer-20030921/m_option.c.printf	Sun Sep 21 22:01:35 2003
+++ mplayer-20030921/m_option.c	Sun Sep 21 22:01:35 2003
@@ -1355,7 +1355,7 @@
       char prefix[len];
       strncpy(prefix,opt->name,len-1);
       prefix[len-1] = '\0';
-      mp_msg(MSGT_VFILTER,MSGL_ERR, "Option %s: unknown postfix %s\n"
+      mp_msg(MSGT_VFILTER,MSGL_ERR, "Option %1$s: unknown postfix %2$s\n"
 	     "Supported postfixes are:\n"
 	     "  %3$s-add\n"
 	     " Append the given list to the current list\n\n"
--- mplayer-20030921/mplayer.c.printf	Sun Sep 21 21:17:48 2003
+++ mplayer-20030921/mplayer.c	Sun Sep 21 22:12:41 2003
@@ -1656,7 +1656,7 @@
   if (sh_video) {
     /* Assume FOURCC if all bytes >= 0x20 (' ') */
     if (sh_video->format >= 0x20202020)
-	mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_FORMAT=%.4s\n", &sh_video->format);
+	mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_FORMAT=%.4s\n", (char *)&sh_video->format);
     else
 	mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_FORMAT=0x%08X\n", sh_video->format);
     mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_VIDEO_BITRATE=%d\n", sh_video->i_bps*8);
@@ -1670,7 +1670,7 @@
       mp_msg(MSGT_GLOBAL,MSGL_INFO, "ID_AUDIO_CODEC=%s\n", sh_audio->codec->name);
     /* Assume FOURCC if all bytes >= 0x20 (' ') */
     if (sh_audio->format >= 0x20202020)
-      mp_msg(MSGT_GLOBAL,MSGL_INFO, "ID_AUDIO_FORMAT=%.4s\n", &sh_audio->format);
+      mp_msg(MSGT_GLOBAL,MSGL_INFO, "ID_AUDIO_FORMAT=%.4s\n", (char *)&sh_audio->format);
     else
       mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_AUDIO_FORMAT=%d\n", sh_audio->format);
     mp_msg(MSGT_GLOBAL,MSGL_INFO,"ID_AUDIO_BITRATE=%d\n", sh_audio->i_bps*8);
@@ -3044,7 +3044,7 @@
 	{
 #ifdef USE_SUB
 	if (sh_video) {
-		mp_msg(MSGT_GLOBAL,MSGL_INFO,"ANS_SUB_VISIBILITY=%ld\n", sub_visibility);
+		mp_msg(MSGT_GLOBAL,MSGL_INFO,"ANS_SUB_VISIBILITY=%d\n", sub_visibility);
 	}
 #endif
 	} break;
@@ -3089,11 +3089,11 @@
 
 	case MP_CMD_GET_VO_FULLSCREEN : {
 	if(video_out && vo_config_count)
-		mp_msg(MSGT_GLOBAL,MSGL_INFO,"ANS_VO_FULLSCREEN=%ld\n", vo_fs);
+		mp_msg(MSGT_GLOBAL,MSGL_INFO,"ANS_VO_FULLSCREEN=%d\n", vo_fs);
 	} break;
     
     case MP_CMD_GET_PERCENT_POS : {
-	mp_msg(MSGT_GLOBAL,MSGL_INFO,"ANS_PERCENT_POSITION=%ld\n", demuxer_get_percent_pos(demuxer));
+	mp_msg(MSGT_GLOBAL,MSGL_INFO,"ANS_PERCENT_POSITION=%d\n", demuxer_get_percent_pos(demuxer));
     } break;
 
 #ifdef USE_DVDNAV


More information about the MPlayer-dev-eng mailing list