[MPlayer-dev-eng] [PATCH] printf warning fixes (REPOST)

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Tue Jan 10 01:09:16 CET 2006


On Sunday, 08 January 2006 at 13:21, Reimar Döffinger wrote:
> Hi,
> On Tue, Jan 03, 2006 at 03:50:55AM +0100, Dominik 'Rathann' Mierzejewski wrote:
> > Here's a current version of my patch that attempts to silence
> > most (if not all) printf format-related warnings.
> 
> Things I am not sure about:
> 1) Does %ld work on MinGW? Maybe it would be better to just cast to int.

After a little research via google: yes, it does work.

> 2) Take care that everything that you use PRId64 etc. for actually is 64
> bit (off_t and size_t do not have to be AFAIK), if in doubt just cast
> those variables, too.

Done.

> 3) even though correct, I'm not sure if those %x -> %p changes are
> desirable or if we should think up some other way.

%x is for unsigned ints. %p is for pointers. Another way would be to cast the pointer
to unsigned int, but what of the platforms where pointers are 64bit? %p is portable.

> > --- MPlayer-20051225/liba52/parse.c.printf	2005-04-07 22:07:53.000000000 +0200
> > +++ MPlayer-20051225/liba52/parse.c	2005-12-25 14:09:37.000000000 +0100
> > @@ -37,6 +37,8 @@
> >  #include "tables.h"
> >  #include "mm_accel.h"
> >  
> > +#include "mp_msg.h"
> > +
> >  #ifdef HAVE_MEMALIGN
> >  /* some systems have memalign() but no declaration for it */
> >  void * memalign (size_t align, size_t size);
> > @@ -71,7 +73,7 @@
> >  #endif
> >      if(((int)samples%16) && (mm_accel&MM_ACCEL_X86_SSE)){
> >        mm_accel &=~MM_ACCEL_X86_SSE;
> > -      printf("liba52: unable to get 16 byte aligned memory disabling usage of SSE instructions\n");
> > +      mp_msg(MSGT_DECAUDIO,MSGL_V,"liba52: unable to get 16 byte aligned memory disabling usage of SSE instructions\n");
> 
> Unrelated?

Yes, I'm attaching a separate patch converting some printfs to mp_msg.

> > --- MPlayer-20051225/libaf/af_resample.c.printf	2005-02-28 01:17:05.000000000 +0100
> > +++ MPlayer-20051225/libaf/af_resample.c	2005-12-25 14:09:37.000000000 +0100
> > @@ -182,7 +182,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);
> 
> ll prefix is not acceptable

Fixed.

> >      printf(" Input format:\n");
> > -	printf("  biSize %d\n", input_bih->biSize);
> > -	printf("  biWidth %d\n", input_bih->biWidth);
> > -	printf("  biHeight %d\n", input_bih->biHeight);
> > +	printf("  biSize %ld\n", input_bih->biSize);
> > +	printf("  biWidth %ld\n", input_bih->biWidth);
> > +	printf("  biHeight %ld\n", input_bih->biHeight);
> 
> Why?? From all I can see these are int, not long.

ve_vfw.c includes <wine/vfw.h>
They are long:

loader/wine/vfw.h
typedef struct __attribute__((__packed__))
{
    long        biSize;
    long        biWidth;
    long        biHeight;
    short       biPlanes;
    short       biBitCount;
    long        biCompression;
    long        biSizeImage;
    long        biXPelsPerMeter;
    long        biYPelsPerMeter;
    long        biClrUsed;
    long        biClrImportant;
} BITMAPINFOHEADER, *PBITMAPINFOHEADER, *LPBITMAPINFOHEADER;

> > -    printf("videocodec: libavcodec (%dx%d fourcc=%x [%.4s])\n",
> > +    mp_msg(MSGT_MENCODER, MSGL_INFO,"videocodec: libavcodec (%dx%d fourcc=%x [%.4s])\n",
> >  	mux_v->bih->biWidth, mux_v->bih->biHeight, mux_v->bih->biCompression,
> >  	    (char *)&mux_v->bih->biCompression);
> 
> Unrelated as well.

Yes.

> > -    mp_msg(MSGT_MENCODER,MSGL_INFO,"videocodec: XViD (%dx%d fourcc=%x [%.4s])\n",
> > +    mp_msg(MSGT_MENCODER,MSGL_INFO,"videocodec: XViD (%dx%d fourcc=%lx [%.4s])\n",
> >  	width, height, fp->mux->bih->biCompression, (char *)&fp->mux->bih->biCompression);
> 
> And why once %x and once %lx for the exact same thing??

Good question. GCC said it was long here and int above. Maybe
BITMAPINFOHEADER structs passed to xvid and lavc are somehow different?
Looks like one may come from vfw.h and the other from ms_hdr.h.
I smell a larger issue here.

> > --- MPlayer-20051225/libmpcodecs/vd_vfw.c.printf	2005-06-15 18:07:32.000000000 +0200
> > +++ MPlayer-20051225/libmpcodecs/vd_vfw.c	2005-12-25 14:09:37.000000000 +0100
> > @@ -184,7 +184,7 @@
> >      ret = ICDecompressGetFormat(priv->handle, sh->bih, priv->o_bih);
> >      if(ret < 0){
> >  	mp_msg(MSGT_WIN32,MSGL_ERR,"ICDecompressGetFormat failed: Error %d\n", (int)ret);
> > -	for (i=0; i < o_bih_len; i++) mp_msg(MSGT_WIN32, MSGL_DBG2, "%02x ", priv->o_bih[i]);
> > +	for (i=0; i < o_bih_len; i++) mp_msg(MSGT_WIN32, MSGL_DBG2, "%02x ", priv->o_bih[i].biSize);
> 
> I'm a bit unsure about what this is supposed to do anyway...

Actually it's my mistake. This code is supposed to hexdump the struct it
receives from ICDecompressGetFormat if there was an error.

> > -    mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"ImageCodecInitialize->%p  size=%d (%d)\n",cres,icap.recordSize,icap.decompressRecordSize);
> > +    mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"ImageCodecInitialize->%#x  size=%d (%d)\n",cres,icap.recordSize,icap.decompressRecordSize);
> 
> Sure that %#x is not some weird extension?

Pretty sure. %x is standard and portable, # is "alternate form" and is
also standard and portable. I'm sure it exists at least on Solaris and
IRIX 6.5.

> > --- MPlayer-20051225/libmpcodecs/vf_remove_logo.c.printf	2005-11-20 01:06:17.000000000 +0100
> > +++ MPlayer-20051225/libmpcodecs/vf_remove_logo.c	2005-12-25 14:09:37.000000000 +0100
> > @@ -552,9 +552,9 @@
> >    pnm_number = fgetc(input) - '0';
> >    if (pnm_number != 5 && pnm_number != 6) REMOVE_LOGO_LOAD_PGM_ERROR_MESSAGE("[vf]remove-logo: Invalid PNM file. Only raw PGM (Portable Gray Map) and raw PPM (Portable Pixel Map) subtypes are allowed.\n");
> >    load_pgm_skip(input);
> > -  if (fscanf(input, "%i", &(new_pgm->width)) != 1) REMOVE_LOGO_LOAD_PGM_ERROR_MESSAGE("[vf]remove-logo: Invalid PGM/PPM header.\n");
> > +  if (fscanf(input, "%hu", &(new_pgm->width)) != 1) REMOVE_LOGO_LOAD_PGM_ERROR_MESSAGE("[vf]remove-logo: Invalid PGM/PPM header.\n");
> >    load_pgm_skip(input);
> > -  if (fscanf(input, "%i", &(new_pgm->height)) != 1) REMOVE_LOGO_LOAD_PGM_ERROR_MESSAGE("[vf]remove-logo: Invalid PGM/PPM header.\n");
> > +  if (fscanf(input, "%hu", &(new_pgm->height)) != 1) REMOVE_LOGO_LOAD_PGM_ERROR_MESSAGE("[vf]remove-logo: Invalid PGM/PPM header.\n");
> 
> I personally would prefer the width and height values to be made int
> instead.

Fixed.

> > --- MPlayer-20051225/libmpdemux/muxer_mpeg.c.printf	2005-12-07 22:52:33.000000000 +0100
> > +++ MPlayer-20051225/libmpdemux/muxer_mpeg.c	2005-12-25 14:09:37.000000000 +0100
> > @@ -1874,7 +1874,7 @@
> >  		case 60060:
> >  			return 1536000;
> >  		default:
> > -			mp_msg(MSGT_MUXER, MSGL_ERR, "ERROR! unknown fps code: %d", fps);
> > +			mp_msg(MSGT_MUXER, MSGL_ERR, "ERROR! unknown fps code: %5.2f", fps);
> 
> Not sure if this was supposed to print the fps value or (int)(fps*1001+0.5)

The latter, fixed.

> > -	  mp_msg (MSGT_HEADER, MSGL_V, "ODML (%.4s): [%d] 0x%016llx 0x%04lx %ld\n", 
> > +	  mp_msg (MSGT_HEADER, MSGL_V, "ODML (%.4s): [%d] 0x%016llx 0x%04x %u\n", 
> 
> Another ll missed.

Fixed.

> > -      chunksize, (int)chunksize+stream_tell(demuxer->stream));
> > +      chunksize, chunksize+(int)stream_tell(demuxer->stream));
> 
> maybe better (int)(chunksize+stream_tell(demuxer->stream)) - if not
> (uint64_t) and PRI?64

The latter, of course. Fixed. BTW: off_t is signed, so (int64_t).

> > @@ -623,7 +623,7 @@
> >  		/* disable seeking */
> >  		demuxer->seekable = 0;
> >  
> > -		printf("VIVO Video stream %d size: display: %dx%d, codec: %ux%u\n",
> > +		mp_msg(MSGT_DEMUX,MSGL_STATUS,"VIVO Video stream %d size: display: %dx%d, codec: %ux%u\n",
> >  		    demuxer->video->id, sh->disp_w, sh->disp_h, sh->bih->biWidth,
> >  		    sh->bih->biHeight);
> 
> Unrelated as well.

Yes.

Attached fixed version with controversial chunks removed.

Regards,
R.

-- 
MPlayer RPMs maintainer: http://rpm.greysector.net/mplayer/
"I am Grey. I stand between the candle and the star. We are Grey.
 We stand between the darkness ... and the light."
        -- Delenn in Grey Council in Babylon 5:"Babylon Squared"
-------------- next part --------------
--- MPlayer-20051225/liba52/parse.c.printf	2005-04-07 22:07:53.000000000 +0200
+++ MPlayer-20051225/liba52/parse.c	2005-12-25 14:09:37.000000000 +0100
@@ -37,6 +37,8 @@
 #include "tables.h"
 #include "mm_accel.h"
 
+#include "mp_msg.h"
+
 #ifdef HAVE_MEMALIGN
 /* some systems have memalign() but no declaration for it */
 void * memalign (size_t align, size_t size);
@@ -71,7 +73,7 @@
 #endif
     if(((int)samples%16) && (mm_accel&MM_ACCEL_X86_SSE)){
       mm_accel &=~MM_ACCEL_X86_SSE;
-      printf("liba52: unable to get 16 byte aligned memory disabling usage of SSE instructions\n");
+      mp_msg(MSGT_DECAUDIO,MSGL_V,"liba52: unable to get 16 byte aligned memory disabling usage of SSE instructions\n");
     }   
     
     if (samples == NULL)
--- MPlayer-20051225/libmpcodecs/ve_lavc.c.printf	2005-12-07 22:52:32.000000000 +0100
+++ MPlayer-20051225/libmpcodecs/ve_lavc.c	2005-12-25 14:09:37.000000000 +0100
@@ -342,7 +342,7 @@
     mux_v->bih->biHeight=height;
     mux_v->bih->biSizeImage=mux_v->bih->biWidth*mux_v->bih->biHeight*(mux_v->bih->biBitCount/8);
 
-    printf("videocodec: libavcodec (%dx%d fourcc=%x [%.4s])\n",
+    mp_msg(MSGT_MENCODER, MSGL_INFO,"videocodec: libavcodec (%dx%d fourcc=%x [%.4s])\n",
 	mux_v->bih->biWidth, mux_v->bih->biHeight, mux_v->bih->biCompression,
 	    (char *)&mux_v->bih->biCompression);
 
--- MPlayer-20051225/libmpdemux/demux_viv.c.printf	2005-12-25 14:03:32.000000000 +0100
+++ MPlayer-20051225/libmpdemux/demux_viv.c	2005-12-25 14:09:37.000000000 +0100
@@ -623,7 +623,7 @@
 		/* disable seeking */
 		demuxer->seekable = 0;
 
-		printf("VIVO Video stream %d size: display: %dx%d, codec: %ux%u\n",
+		mp_msg(MSGT_DEMUX,MSGL_STATUS,"VIVO Video stream %d size: display: %dx%d, codec: %ux%u\n",
 		    demuxer->video->id, sh->disp_w, sh->disp_h, sh->bih->biWidth,
 		    sh->bih->biHeight);
 }
-------------- next part --------------
--- MPlayer-20060109/help/help_mp-en.h.printf	2005-12-25 14:03:32.000000000 +0100
+++ MPlayer-20060109/help/help_mp-en.h	2006-01-09 22:58:40.000000000 +0100
@@ -257,7 +257,7 @@
 #define MSGTR_AudioStreamResult "\nAudio stream: %8.3f kbit/s  (%d B/s)  size: %d bytes  %5.3f secs\n"
 #define MSGTR_OpenedStream "success: format: %d  data: 0x%X - 0x%x\n"
 #define MSGTR_VCodecFramecopy "videocodec: framecopy (%dx%d %dbpp fourcc=%x)\n"
-#define MSGTR_ACodecFramecopy "audiocodec: framecopy (format=%x chans=%d rate=%ld bits=%d B/s=%ld sample-%ld)\n"
+#define MSGTR_ACodecFramecopy "audiocodec: framecopy (format=%x chans=%d rate=%d bits=%d B/s=%d sample-%d)\n"
 #define MSGTR_CBRPCMAudioSelected "CBR PCM audio selected\n"
 #define MSGTR_MP3AudioSelected "MP3 audio selected\n"
 #define MSGTR_CannotAllocateBytes "Couldn't allocate %d bytes\n"
@@ -267,7 +267,7 @@
 #define MSGTR_LimitingAudioPreload "Limiting audio preload to 0.4s\n"
 #define MSGTR_IncreasingAudioDensity "Increasing audio density to 4\n"
 #define MSGTR_ZeroingAudioPreloadAndMaxPtsCorrection "Forcing audio preload to 0, max pts correction to 0\n"
-#define MSGTR_CBRAudioByterate "\n\nCBR audio: %ld bytes/sec, %d bytes/block\n"
+#define MSGTR_CBRAudioByterate "\n\nCBR audio: %d bytes/sec, %d bytes/block\n"
 #define MSGTR_LameVersion "LAME version %s (%s)\n\n"
 #define MSGTR_InvalidBitrateForLamePreset "Error: The bitrate specified is out of the valid range for this preset\n"\
 "\n"\
@@ -580,7 +580,7 @@
 #define MSGTR_LeaveTelecineMode "\ndemux_mpg: 30000/1001fps NTSC content detected, switching framerate.\n"
 #define MSGTR_EnterTelecineMode "\ndemux_mpg: 24000/1001fps progressive NTSC content detected, switching framerate.\n"
 
-#define MSGTR_CacheFill "\rCache fill: %5.2f%% (%d bytes)   "
+#define MSGTR_CacheFill "\rCache fill: %5.2f%% (%"PRId64" bytes)   "
 #define MSGTR_NoBindFound "No bind found for key '%s'"
 #define MSGTR_FailedToOpen "Failed to open %s\n"
 
@@ -1209,7 +1209,7 @@
 #define MSGTR_MPDEMUX_AIALSA_UnavailableAccessType "Access type not available\n"
 #define MSGTR_MPDEMUX_AIALSA_UnavailableSampleFmt "Sample format not available\n"
 #define MSGTR_MPDEMUX_AIALSA_UnavailableChanCount "Channel count not available - reverting to default: %d\n"
-#define MSGTR_MPDEMUX_AIALSA_CannotInstallHWParams "Unable to install hw params:"
+#define MSGTR_MPDEMUX_AIALSA_CannotInstallHWParams "Unable to install hw params: %s"
 #define MSGTR_MPDEMUX_AIALSA_PeriodEqualsBufferSize "Can't use period equal to buffer size (%u == %lu)\n"
 #define MSGTR_MPDEMUX_AIALSA_CannotInstallSWParams "Unable to install sw params:\n"
 #define MSGTR_MPDEMUX_AIALSA_ErrorOpeningAudio "Error opening audio: %s\n"
@@ -1313,7 +1313,7 @@
 #define MSGTR_MPDEMUX_AVIHDR_RegeneratingKeyfTableForMPEG4 "Regenerating keyframe table for MPEG4 video\n"
 #define MSGTR_MPDEMUX_AVIHDR_FoundWaveFmt "Found 'wf', %d bytes of %d\n"
 #define MSGTR_MPDEMUX_AVIHDR_FoundAVIV2Header "AVI: dmlh found (size=%d) (total_frames=%d)\n"
-#define MSGTR_MPDEMUX_AVIHDR_ReadingIndexBlockChunksForFrames  "Reading INDEX block, %d chunks for %ld frames (fpos=%p)\n"
+#define MSGTR_MPDEMUX_AVIHDR_ReadingIndexBlockChunksForFrames  "Reading INDEX block, %d chunks for %d frames (fpos=%"PRId64")\n"
 #define MSGTR_MPDEMUX_AVIHDR_AdditionalRIFFHdr "Additional RIFF header...\n"
 #define MSGTR_MPDEMUX_AVIHDR_WarnNotExtendedAVIHdr "** warning: this is no extended AVI header..\n"
 #define MSGTR_MPDEMUX_AVIHDR_BrokenChunk "Broken chunk?  chunksize=%d  (id=%.4s)\n"
@@ -1338,7 +1338,7 @@
 
 #define MSGTR_MPDEMUX_CDDA_CantOpenCDDADevice "Can't open CDDA device.\n"
 #define MSGTR_MPDEMUX_CDDA_CantOpenDisc "Can't open disc.\n"
-#define MSGTR_MPDEMUX_CDDA_AudioCDFoundWithNTracks "Found audio CD with %d tracks.\n"
+#define MSGTR_MPDEMUX_CDDA_AudioCDFoundWithNTracks "Found audio CD with %ld tracks.\n"
 
 // cddb.c
 
--- MPlayer-20060109/libaf/af_resample.c.printf	2005-02-28 01:17:05.000000000 +0100
+++ MPlayer-20060109/libaf/af_resample.c	2006-01-10 00:07:40.000000000 +0100
@@ -182,7 +182,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%016"PRIX64".\n",
 	     s->step);
       af->mul.n = af->data->rate;
       af->mul.d = n->rate;
--- MPlayer-20060109/libao2/ao_alsa.c.printf	2005-12-25 14:03:32.000000000 +0100
+++ MPlayer-20060109/libao2/ao_alsa.c	2006-01-09 22:58:40.000000000 +0100
@@ -610,11 +610,11 @@
 	if ((err = snd_pcm_hw_params_set_period_size_near(alsa_handler, alsa_hwparams, 
 							  &chunk_size, &dir)) < 0)
 	  {
-	    mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to set periodsize(%d): %s\n",
+	    mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to set periodsize(%ld): %s\n",
 			    chunk_size, snd_strerror(err));
 	  }
 	else {
-	  mp_msg(MSGT_AO,MSGL_V,"alsa-init: chunksize set to %i\n", chunk_size);
+	  mp_msg(MSGT_AO,MSGL_V,"alsa-init: chunksize set to %li\n", chunk_size);
 	}
 	if ((err = snd_pcm_hw_params_set_periods_near(alsa_handler, alsa_hwparams,
 						      &alsa_fragcount, &dir)) < 0) {
--- MPlayer-20060109/libmpcodecs/vf.c.printf	2005-12-25 14:03:32.000000000 +0100
+++ MPlayer-20060109/libmpcodecs/vf.c	2006-01-09 22:58:40.000000000 +0100
@@ -405,7 +405,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-20060109/libmpcodecs/vd_vfw.c.printf	2005-06-15 18:07:32.000000000 +0200
+++ MPlayer-20060109/libmpcodecs/vd_vfw.c	2006-01-09 23:39:48.000000000 +0100
@@ -275,14 +275,14 @@
 #endif
     if (ret)
     {
-	mp_msg(MSGT_WIN32, MSGL_WARN, "ICDecompressEnd failed: %d\n", ret);
+	mp_msg(MSGT_WIN32, MSGL_WARN, "ICDecompressEnd failed: %ld\n", ret);
 	return;
     }
 
     ret = ICClose(priv->handle);
     if (ret)
     {
-	mp_msg(MSGT_WIN32, MSGL_WARN, "ICClose failed: %d\n", ret);
+	mp_msg(MSGT_WIN32, MSGL_WARN, "ICClose failed: %ld\n", ret);
 	return;
     }
     
@@ -323,7 +323,7 @@
 	   sh->bih, data, priv->o_bih, (flags&3) ? 0 : mpi->planes[0]);
 
     if ((int)ret){
-      mp_msg(MSGT_DECVIDEO,MSGL_WARN,"Error decompressing frame, err=%d\n",ret);
+      mp_msg(MSGT_DECVIDEO,MSGL_WARN,"Error decompressing frame, err=%ld\n",ret);
       return NULL;
     }
     
--- MPlayer-20060109/libmpcodecs/vd_qtvideo.c.printf	2005-11-20 01:06:16.000000000 +0100
+++ MPlayer-20060109/libmpcodecs/vd_qtvideo.c	2006-01-09 22:58:40.000000000 +0100
@@ -152,7 +152,7 @@
 
     result=InitializeQTML(6+16);
 //    result=InitializeQTML(0);
-    mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"InitializeQTML returned %i\n",result);
+    mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"InitializeQTML returned %li\n",result);
 //    result=EnterMovies();
 //    printf("EnterMovies->%d\n",result);
 #endif /* !MACOSX */
@@ -193,20 +193,20 @@
     desc.componentFlags=0;
     desc.componentFlagsMask=0;
 
-    mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"Count = %d\n",CountComponents(&desc));
+    mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"Count = %ld\n",CountComponents(&desc));
     prev=FindNextComponent(NULL,&desc);
     if(!prev){
 	mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Cannot find requested component\n");
 	return(0);
     }
-    mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"Found it! ID = 0x%X\n",prev);
+    mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"Found it! ID = %p\n",prev);
 
     ci=OpenComponent(prev);
     mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"ci=%p\n",ci);
 
     memset(&icap,0,sizeof(icap));
     cres=ImageCodecInitialize(ci,&icap);
-    mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"ImageCodecInitialize->%p  size=%d (%d)\n",cres,icap.recordSize,icap.decompressRecordSize);
+    mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"ImageCodecInitialize->%#x  size=%d (%d)\n",cres,icap.recordSize,icap.decompressRecordSize);
     
     memset(&cinfo,0,sizeof(cinfo));
     cres=ImageCodecGetCodecInfo(ci,&cinfo);
@@ -281,7 +281,7 @@
 	    mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Unknown requested csp\n");
 	    return(0);    
     }
-    mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"imgfmt: %s qt_imgfmt: %.4s\n", vo_format_name(imgfmt), &qt_imgfmt);
+    mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"imgfmt: %s qt_imgfmt: %.4s\n", vo_format_name(imgfmt), (char *)&qt_imgfmt);
     sh->context = (void *)qt_imgfmt;
     if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,imgfmt)) return 0;
     }
@@ -327,7 +327,7 @@
         0, 
         mpi->planes[0],
         mpi->stride[0]);
-    mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"NewGWorldFromPtr returned:%d\n",65536-(result&0xffff));
+    mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"NewGWorldFromPtr returned:%ld\n",65536-(result&0xffff));
 //    if (65536-(result&0xFFFF) != 10000)
 //	return NULL;
 
@@ -368,7 +368,7 @@
     if(decpar.wantedDestinationPixelTypes)
     { OSType *p=*(decpar.wantedDestinationPixelTypes);
       if(p) while(*p){
-          mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"supported csp: 0x%08X %.4s\n",*p,p);
+          mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"supported csp: 0x%08X %.4s\n",*p,(char *)p);
 	  ++p;
       }
     }
@@ -390,7 +390,7 @@
     if(decpar.frameNumber==124){
 	decpar.frameNumber=1;
 	cres=ImageCodecPreDecompress(ci,&decpar);
-	mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"ImageCodecPreDecompress cres=0x%X\n",cres);
+	mp_msg(MSGT_DECVIDEO,MSGL_DBG2,"ImageCodecPreDecompress cres=0x%lX\n",cres);
     }
 #endif
 
--- MPlayer-20060109/libmpcodecs/vd_xanim.c.printf	2003-07-03 22:22:51.000000000 +0200
+++ MPlayer-20060109/libmpcodecs/vd_xanim.c	2006-01-09 22:58:40.000000000 +0100
@@ -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-20060109/libmpcodecs/ad_faad.c.printf	2005-11-20 01:06:16.000000000 +0100
+++ MPlayer-20060109/libmpcodecs/ad_faad.c	2006-01-09 22:58:40.000000000 +0100
@@ -151,7 +151,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;
     if (audio_output_channels <= 2) sh->channels = faac_channels > 1 ? 2 : 1;
     sh->samplerate = faac_samplerate;
@@ -266,7 +266,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);
       last_dec_len = sh->samplesize*faac_finfo.samples;
--- MPlayer-20060109/libmpcodecs/ad_libvorbis.c.printf	2005-12-07 22:52:31.000000000 +0100
+++ MPlayer-20060109/libmpcodecs/ad_libvorbis.c	2006-01-09 22:58:40.000000000 +0100
@@ -128,7 +128,7 @@
     op.packet = headers[i];
     op.b_o_s  = (i == 0);
     if(vorbis_synthesis_headerin(&ov->vi,&vc,&op) <0) {
-      mp_msg(MSGT_DECAUDIO,MSGL_ERR,"OggVorbis: header n. %d broken! len=%d\n", i, op.bytes);
+      mp_msg(MSGT_DECAUDIO,MSGL_ERR,"OggVorbis: header n. %d broken! len=%ld\n", i, op.bytes);
       ERROR();
     }
     if(i == 2) {
--- MPlayer-20060109/libmpcodecs/ve_qtvideo.c.printf	2005-11-20 01:06:16.000000000 +0100
+++ MPlayer-20060109/libmpcodecs/ve_qtvideo.c	2006-01-09 22:58:40.000000000 +0100
@@ -146,13 +146,13 @@
     cdesc.componentFlagsMask=0;
 
 
-    mp_msg(MSGT_MENCODER,MSGL_DBG2,"Count = %d\n",CountComponents(&cdesc));
+    mp_msg(MSGT_MENCODER,MSGL_DBG2,"Count = %ld\n",CountComponents(&cdesc));
     compressor=FindNextComponent(NULL,&cdesc);
     if(!compressor){
 	mp_msg(MSGT_MENCODER,MSGL_ERR,"Cannot find requested component\n");
 	return(0);
     }
-    mp_msg(MSGT_MENCODER,MSGL_DBG2,"Found it! ID = 0x%X\n",compressor);
+    mp_msg(MSGT_MENCODER,MSGL_DBG2,"Found it! ID = %p\n",compressor);
 
 //	cres= FindCodec (fourcc,anyCodec,&compressor,&decompressor );
 //	printf("FindCodec returned:%i compressor: 0x%X decompressor: 0x%X\n",cres&0xFFFF,compressor,decompressor);
@@ -218,7 +218,7 @@
        bswap_32(format),
        compressor,
        &framesizemax );
-    mp_msg(MSGT_MENCODER,MSGL_DBG2,"GetMaxCompressionSize returned:%i : MaxSize:%i\n",cres&0xFFFF,framesizemax);
+    mp_msg(MSGT_MENCODER,MSGL_DBG2,"GetMaxCompressionSize returned:%i : MaxSize:%li\n",cres&0xFFFF,framesizemax);
     frame_comp=malloc(framesizemax);
 
     desc = (ImageDescriptionHandle)NewHandleClear(MAX_IDSIZE); //memory where the desc will be stored
--- MPlayer-20060109/libmpcodecs/ad_acm.c.printf	2005-12-07 22:52:31.000000000 +0100
+++ MPlayer-20060109/libmpcodecs/ad_acm.c	2006-01-09 22:58:40.000000000 +0100
@@ -153,7 +153,7 @@
 	case ACMERR_NOTPOSSIBLE:
 	    return;
 	default:
-	    mp_msg(MSGT_WIN32, MSGL_WARN, "ACM_Decoder: unknown error occurred: %d\n", ret);
+	    mp_msg(MSGT_WIN32, MSGL_WARN, "ACM_Decoder: unknown error occurred: %ld\n", ret);
 	    return;
     }
     
@@ -189,7 +189,7 @@
     acm_context_t *priv = sh_audio->context;
 
     acmStreamSize(priv->handle, len, &srcsize, ACM_STREAMSIZEF_DESTINATION);
-    mp_msg(MSGT_WIN32,MSGL_DBG3,"acm says: srcsize=%ld  (buffsize=%d)  out_size=%d\n",srcsize,sh_audio->a_in_buffer_size,len);
+    mp_msg(MSGT_WIN32,MSGL_DBG3,"acm says: srcsize=%ld  (buffsize=%d)  out_size=%ld\n",srcsize,sh_audio->a_in_buffer_size,len);
 
     if(srcsize<sh_audio->wf->nBlockAlign){
        srcsize=sh_audio->wf->nBlockAlign;
@@ -204,7 +204,7 @@
         demux_read_data(sh_audio->ds,&sh_audio->a_in_buffer[sh_audio->a_in_buffer_len],
         srcsize-sh_audio->a_in_buffer_len);
     }
-    mp_msg(MSGT_WIN32,MSGL_DBG3,"acm convert %d -> %d bytes\n",sh_audio->a_in_buffer_len,len);
+    mp_msg(MSGT_WIN32,MSGL_DBG3,"acm convert %d -> %ld bytes\n",sh_audio->a_in_buffer_len,len);
     memset(&ash, 0, sizeof(ash));
     ash.cbStruct=sizeof(ash);
     ash.fdwStatus=0;
@@ -229,7 +229,7 @@
       }
 //      return -1;
     }
-    mp_msg(MSGT_WIN32,MSGL_DBG2,"acm converted %d -> %d\n",ash.cbSrcLengthUsed,ash.cbDstLengthUsed);
+    mp_msg(MSGT_WIN32,MSGL_DBG2,"acm converted %ld -> %ld\n",ash.cbSrcLengthUsed,ash.cbDstLengthUsed);
     if(ash.cbSrcLengthUsed>=sh_audio->a_in_buffer_len){
       sh_audio->a_in_buffer_len=0;
     } else {
--- MPlayer-20060109/libmpcodecs/vf_remove_logo.c.printf	2005-11-20 01:06:17.000000000 +0100
+++ MPlayer-20060109/libmpcodecs/vf_remove_logo.c	2006-01-09 23:12:03.000000000 +0100
@@ -132,8 +132,8 @@
  */
 typedef struct
 {
-  unsigned short int width;
-  unsigned short int height;
+  unsigned int width;
+  unsigned int height;
 
   unsigned char * pixel;
 
--- MPlayer-20060109/libmpcodecs/ae_faac.c.printf	2005-11-20 01:06:16.000000000 +0100
+++ MPlayer-20060109/libmpcodecs/ae_faac.c	2006-01-09 22:58:40.000000000 +0100
@@ -122,7 +122,7 @@
 		mp_msg(MSGT_MENCODER, MSGL_FATAL, "AE_FAAC, couldn't init, exit\n");
 		return 0;
 	}
-	mp_msg(MSGT_MENCODER, MSGL_V, "AE_FAAC, sample_input: %u, max_bytes_output: %u\n", samples_input, max_bytes_output);
+	mp_msg(MSGT_MENCODER, MSGL_V, "AE_FAAC, sample_input: %lu, max_bytes_output: %lu\n", samples_input, max_bytes_output);
 	config = faacEncGetCurrentConfiguration(faac);
 	if(!config)
 	{
--- MPlayer-20060109/libmpdemux/demux_asf.c.printf	2006-01-08 19:23:32.000000000 +0100
+++ MPlayer-20060109/libmpdemux/demux_asf.c	2006-01-09 23:53:23.000000000 +0100
@@ -361,7 +361,7 @@
             return 1; // success
     }
     
-    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]);
+    mp_msg(MSGT_DEMUX,MSGL_V,"%08"PRIX64":  UNKNOWN TYPE  %02X %02X %02X %02X %02X...\n",(int64_t)demux->filepos,asf_packet[0],asf_packet[1],asf_packet[2],asf_packet[3],asf_packet[4]);
     return 0;
 }
 
--- MPlayer-20060109/libmpdemux/demux_real.c.printf	2006-01-08 19:23:32.000000000 +0100
+++ MPlayer-20060109/libmpdemux/demux_real.c	2006-01-09 22:58:40.000000000 +0100
@@ -1790,7 +1790,7 @@
     if(demuxer->video->sh){
 	sh_video_t *sh=demuxer->video->sh;
 	mp_msg(MSGT_DEMUX,MSGL_V,"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-20060109/libmpdemux/muxer_mpeg.c.printf	2006-01-08 19:23:32.000000000 +0100
+++ MPlayer-20060109/libmpdemux/muxer_mpeg.c	2006-01-09 23:14:13.000000000 +0100
@@ -1779,7 +1779,7 @@
 		case 60060:
 			return 1536000;
 		default:
-			mp_msg(MSGT_MUXER, MSGL_ERR, "ERROR! unknown fps code: %d", fps);
+			mp_msg(MSGT_MUXER, MSGL_ERR, "ERROR! unknown fps code: %d", (int)(fps*1001+0.5));
 			return 0;
 	}
 }
--- MPlayer-20060109/libmpdemux/demux_ty.c.printf	2005-12-13 22:12:01.000000000 +0100
+++ MPlayer-20060109/libmpdemux/demux_ty.c	2006-01-09 23:55:06.000000000 +0100
@@ -188,7 +188,7 @@
       }
       if ( ok == 0 )
       { 
-         mp_msg( MSGT_DEMUX, MSGL_DBG3, "Seek bad %d\n", offset );
+         mp_msg( MSGT_DEMUX, MSGL_DBG3, "Seek bad %"PRId64"\n", (int64_t)offset );
          done = 1;
          error = 1;
          break;
@@ -282,9 +282,9 @@
       tivo->tmf_totalchunks += ( tivo->tmfparts[ index ].fileSize / CHUNKSIZE );
    }
    mp_msg( MSGT_DEMUX, MSGL_DBG3,
-      "tmf_filetoparts():total size %"PRId64"\n", tivo->tmf_totalsize );
+      "tmf_filetoparts():total size %"PRId64"\n", (int64_t)tivo->tmf_totalsize );
    mp_msg( MSGT_DEMUX, MSGL_DBG3,
-      "tmf_filetoparts():total chunks %d\n", tivo->tmf_totalchunks );
+      "tmf_filetoparts():total chunks %"PRId64"\n", (int64_t)tivo->tmf_totalchunks );
 
    return( 1 );
 }
@@ -697,8 +697,8 @@
                   numberParts = demux->stream->end_pos / TIVO_PART_LENGTH;
                   offset = numberParts * TIVO_PART_LENGTH;
 
-                  mp_msg( MSGT_DEMUX, MSGL_DBG3, "ty:ty/ty+Number Parts %d\n",
-                    numberParts );
+                  mp_msg( MSGT_DEMUX, MSGL_DBG3, "ty:ty/ty+Number Parts %"PRId64"\n",
+                    (int64_t)numberParts );
 
                   if ( ( offset + CHUNKSIZE ) < demux->stream->end_pos )
                   {
@@ -753,13 +753,13 @@
    // Give a clue as to where we are in the stream
    // ======================================================================
    mp_msg( MSGT_DEMUX, MSGL_DBG3,
-      "ty:ty header size %"PRIx64"\n", tivo->size );
+      "ty:ty header size %"PRIx64"\n", (int64_t)tivo->size );
    mp_msg( MSGT_DEMUX, MSGL_DBG3,
-      "ty:ty which Chunk %"PRIx64"\n", tivo->whichChunk );
+      "ty:ty which Chunk %d\n", tivo->whichChunk );
    mp_msg( MSGT_DEMUX, MSGL_DBG3,
-      "ty:file end_pos   %"PRIx64"\n", demux->stream->end_pos );
+      "ty:file end_pos   %"PRIx64"\n", (int64_t)demux->stream->end_pos );
    mp_msg( MSGT_DEMUX, MSGL_DBG3,
-      "\nty:wanted current offset %"PRIx64"\n", stream_tell( demux->stream ) );
+      "\nty:wanted current offset %"PRIx64"\n", (int64_t)stream_tell( demux->stream ) );
 
    if ( tivo->size > 0 )
    {
--- MPlayer-20060109/libmpdemux/demux_avi.c.printf	2006-01-08 19:23:32.000000000 +0100
+++ MPlayer-20060109/libmpdemux/demux_avi.c	2006-01-09 23:55:53.000000000 +0100
@@ -221,7 +221,7 @@
 
     pos = (off_t)priv->idx_offset+AVI_IDX_OFFSET(idx);
     if((pos<demux->movi_start || pos>=demux->movi_end) && (demux->movi_end>demux->movi_start) && (demux->stream->flags & STREAM_SEEK)){
-      mp_msg(MSGT_DEMUX,MSGL_V,"ChunkOffset out of range!   idx=0x%X  \n",pos);
+      mp_msg(MSGT_DEMUX,MSGL_V,"ChunkOffset out of range!   idx=0x%"PRIX64"  \n",(int64_t)pos);
       continue;
     }
 #if 0
@@ -245,7 +245,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);
     }
@@ -335,7 +335,7 @@
 
     pos = priv->idx_offset+AVI_IDX_OFFSET(idx);
     if((pos<demux->movi_start || pos>=demux->movi_end) && (demux->movi_end>demux->movi_start)){
-      mp_msg(MSGT_DEMUX,MSGL_V,"ChunkOffset out of range!  current=0x%X  idx=0x%X  \n",demux->filepos,pos);
+      mp_msg(MSGT_DEMUX,MSGL_V,"ChunkOffset out of range!  current=0x%"PRIX64"  idx=0x%"PRIX64"  \n",(int64_t)demux->filepos,(int64_t)pos);
       continue;
     }
 #if 0
@@ -358,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);
     }
@@ -582,7 +582,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;
@@ -609,7 +609,7 @@
       }
     }
     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=%d (%u)  audio size=%d\n",vsize,priv->numberofframes,asize);
     sh_video->i_bps=(float)vsize/(sh_video->frametime*priv->numberofframes);
   }
   return demuxer;
--- MPlayer-20060109/libmpdemux/demux_film.c.printf	2006-01-09 22:58:40.000000000 +0100
+++ MPlayer-20060109/libmpdemux/demux_film.c	2006-01-09 22:58:40.000000000 +0100
@@ -249,7 +249,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-20060109/libmpdemux/cache2.c.printf	2005-11-20 01:06:17.000000000 +0100
+++ MPlayer-20060109/libmpdemux/cache2.c	2006-01-09 23:57:36.000000000 +0100
@@ -120,7 +120,7 @@
   
   if(read<s->min_filepos || read>s->max_filepos){
       // seek...
-      mp_msg(MSGT_CACHE,MSGL_DBG2,"Out of boundaries... seeking to 0x%X  \n",read);
+      mp_msg(MSGT_CACHE,MSGL_DBG2,"Out of boundaries... seeking to 0x%"PRIX64"  \n",(int64_t)read);
       // 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->seek_limit)
@@ -129,7 +129,7 @@
         s->min_filepos=s->max_filepos=read; // drop cache content :(
         if(s->stream->eof) stream_reset(s->stream);
         stream_seek(s->stream,read);
-        mp_msg(MSGT_CACHE,MSGL_DBG2,"Seek done. new pos: 0x%X  \n",(int)stream_tell(s->stream));
+        mp_msg(MSGT_CACHE,MSGL_DBG2,"Seek done. new pos: 0x%"PRIX64"  \n",(int64_t)stream_tell(s->stream));
       }
   }
   
@@ -288,12 +288,12 @@
     stream->cache_pid = CreateThread(NULL,0,ThreadProc,s,0,&threadId);
 #endif
     // wait until cache is filled at least prefill_init %
-    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);
+    mp_msg(MSGT_CACHE,MSGL_V,"CACHE_PRE_INIT: %"PRId64" [%"PRId64"] %"PRId64"  pre:%d  eof:%d  \n",
+	(int64_t)s->min_filepos,(int64_t)s->read_filepos,(int64_t)s->max_filepos,min,s->eof);
     while(s->read_filepos<s->min_filepos || s->max_filepos-s->read_filepos<min){
 	mp_msg(MSGT_CACHE,MSGL_STATUS,MSGTR_CacheFill,
 	    100.0*(float)(s->max_filepos-s->read_filepos)/(float)(s->buffer_size),
-	    s->max_filepos-s->read_filepos
+	    (int64_t)s->max_filepos-s->read_filepos
 	);
 	if(s->eof) break; // file is smaller than prefill size
 	if(mp_input_check_interrupt(PREFILL_SLEEP_TIME))
@@ -347,7 +347,7 @@
   s=stream->cache_data;
 //  s->seek_lock=1;
   
-  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);
+  mp_msg(MSGT_CACHE,MSGL_DBG2,"CACHE2_SEEK: 0x%"PRIX64" <= 0x%"PRIX64" (0x%"PRIX64") <= 0x%"PRIX64"  \n",s->min_filepos,pos,s->read_filepos,s->max_filepos);
 
   newpos=pos/s->sector_size; newpos*=s->sector_size; // align
   stream->pos=s->read_filepos=newpos;
--- MPlayer-20060109/libmpdemux/aviheader.c.printf	2005-11-06 18:35:32.000000000 +0100
+++ MPlayer-20060109/libmpdemux/aviheader.c	2006-01-10 00:00:05.000000000 +0100
@@ -238,7 +238,7 @@
 	  s->aIndex[i].qwOffset |= ((uint64_t)stream_read_dword_le(demuxer->stream) & 0xffffffff)<<32;
 	  s->aIndex[i].dwSize = stream_read_dword_le(demuxer->stream);
 	  s->aIndex[i].dwDuration = stream_read_dword_le(demuxer->stream);
-	  mp_msg (MSGT_HEADER, MSGL_V, "ODML (%.4s): [%d] 0x%016llx 0x%04lx %ld\n", 
+	  mp_msg (MSGT_HEADER, MSGL_V, "ODML (%.4s): [%d] 0x%016"PRIx64" 0x%04x %u\n", 
 		  (s->dwChunkId), i,
 		  (uint64_t)s->aIndex[i].qwOffset, s->aIndex[i].dwSize, s->aIndex[i].dwDuration);
       }
@@ -353,7 +353,7 @@
       uint32_t last_off = 0;
       priv->idx_size=size2>>4;
       mp_msg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_ReadingIndexBlockChunksForFrames,
-        priv->idx_size,avih.dwTotalFrames, stream_tell(demuxer->stream));
+        priv->idx_size,avih.dwTotalFrames, (int64_t)stream_tell(demuxer->stream));
       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);
@@ -410,9 +410,9 @@
       demux_info_add(demuxer, hdr, buf);
     }
   }
-  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));
+  mp_msg(MSGT_HEADER,MSGL_DBG2,"list_end=0x%"PRIX64"  pos=0x%"PRIX64"  chunksize=0x%"PRIX64"  next=0x%"PRIX64"\n",
+      (int64_t)list_end, (int64_t)stream_tell(demuxer->stream),
+      (int64_t)chunksize, (int64_t)chunksize+(int64_t)stream_tell(demuxer->stream));
   if(list_end>0 &&
      chunksize+stream_tell(demuxer->stream) == list_end) list_end=0;
   if(list_end>0 && chunksize+stream_tell(demuxer->stream)>list_end){
--- MPlayer-20060109/libmpdemux/demux_mpg.c.printf	2006-01-08 19:23:32.000000000 +0100
+++ MPlayer-20060109/libmpdemux/demux_mpg.c	2006-01-10 00:00:35.000000000 +0100
@@ -616,7 +616,7 @@
   if(demux->synced==1){
     if(head==0x1BB || head==0x1BD || (head>=0x1C0 && head<=0x1EF)){
       demux->synced=2;
-      mp_msg(MSGT_DEMUX,MSGL_V,"system stream synced at 0x%X (%d)!\n",demux->filepos,demux->filepos);
+      mp_msg(MSGT_DEMUX,MSGL_V,"system stream synced at 0x%"PRIX64" (%"PRId64")!\n",(int64_t)demux->filepos,(int64_t)demux->filepos);
       num_elementary_packets100=0; // requires for re-sync!
       num_elementary_packets101=0; // requires for re-sync!
     } else demux->synced=0;
--- MPlayer-20060109/libmpdemux/muxer_avi.c.printf	2005-12-07 22:52:33.000000000 +0100
+++ MPlayer-20060109/libmpdemux/muxer_avi.c	2006-01-09 22:58:40.000000000 +0100
@@ -531,7 +531,7 @@
   } else {
     if (ftello(f) != MOVIALIGN) {
 	mp_msg(MSGT_MUXER, MSGL_ERR, "Opendml superindex is too big for reserved space!\n");
-	mp_msg(MSGT_MUXER, MSGL_ERR, "Expected filepos %d, real filepos %d, missing space %d\n", MOVIALIGN, ftell(muxer->file), ftell(muxer->file)-MOVIALIGN);
+	mp_msg(MSGT_MUXER, MSGL_ERR, "Expected filepos %d, real filepos %ld, missing space %ld\n", MOVIALIGN, ftell(muxer->file), ftell(muxer->file)-MOVIALIGN);
 	mp_msg(MSGT_MUXER, MSGL_ERR, "Try increasing MOVIALIGN in libmpdemux/muxer_avi.c\n");
     }
     write_avi_list(f,listtypeAVIMOVIE,muxer->movi_end-ftello(f)-12);
--- MPlayer-20060109/libmpdemux/tvi_v4l.c.printf	2005-11-20 01:06:18.000000000 +0100
+++ MPlayer-20060109/libmpdemux/tvi_v4l.c	2006-01-09 22:58:40.000000000 +0100
@@ -437,7 +437,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-20060109/libmpdemux/demux_lmlm4.c.printf	2005-08-06 02:41:22.000000000 +0200
+++ MPlayer-20060109/libmpdemux/demux_lmlm4.c	2006-01-10 00:01:01.000000000 +0100
@@ -216,7 +216,7 @@
 
 hdr:
     demux->filepos = stream_tell(demux->stream);
-    mp_msg(MSGT_DEMUX, MSGL_DBG2, "fpos = %d\n", demux->filepos);
+    mp_msg(MSGT_DEMUX, MSGL_DBG2, "fpos = %"PRId64"\n", (int64_t)demux->filepos);
     
     ret=getFrame(demux, &frameInfo);
     if(ret<=0) return ret; // EOF/error
--- MPlayer-20060109/libmpdemux/demux_mov.c.printf	2006-01-02 21:50:38.000000000 +0100
+++ MPlayer-20060109/libmpdemux/demux_mov.c	2006-01-10 00:04:44.000000000 +0100
@@ -388,7 +388,7 @@
      	      break;
 	    default:
 	      tmp = be2me_32(tmp);  
-	      mp_msg(MSGT_DEMUX,MSGL_WARN,"ISO: Unknown File Type Major Brand: %.4s\n",&tmp);
+	      mp_msg(MSGT_DEMUX,MSGL_WARN,"ISO: Unknown File Type Major Brand: %.4s\n",(char *)&tmp);
 	  }
 	  mp_msg(MSGT_DEMUX,MSGL_V,"ISO: File Type Minor Version: %d\n",
 	      stream_read_dword(demuxer->stream));
@@ -396,7 +396,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,"ISO: File Type Compatible Brand #%d: %.4s\n",i,&tmp);
+	    mp_msg(MSGT_DEMUX,MSGL_V,"ISO: File Type Compatible Brand #%d: %.4s\n",i,(char *)&tmp);
 	    skipped += 4;
 	  }
 #endif	  
@@ -406,8 +406,8 @@
 	  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;
-	  mp_msg(MSGT_DEMUX,MSGL_DBG2,"MOV: Movie header: start: %x end: %x\n",
-	    priv->moov_start, priv->moov_end);
+	  mp_msg(MSGT_DEMUX,MSGL_DBG2,"MOV: Movie header: start: %"PRIx64" end: %"PRIx64"\n",
+	    (int64_t)priv->moov_start, (int64_t)priv->moov_end);
 	  skipped+=8;
 	  i = stream_read_dword(demuxer->stream)-8;
 	  if(stream_read_dword(demuxer->stream)==MOV_FOURCC('r','m','r','a')){
@@ -470,8 +470,8 @@
 	  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;
-	  mp_msg(MSGT_DEMUX,MSGL_DBG2,"MOV: Movie data: start: %x end: %x\n",
-	    priv->mdat_start, priv->mdat_end);
+	  mp_msg(MSGT_DEMUX,MSGL_DBG2,"MOV: Movie data: start: %"PRIx64" end: %"PRIx64"\n",
+	    (int64_t)priv->mdat_start, (int64_t)priv->mdat_end);
 	  flags|=2;
 	  if(flags==3){
 	    // if we're over the headers, then we can stop parsing here!
@@ -482,7 +482,7 @@
 	case MOV_FOURCC('f','r','e','e'):
 	case MOV_FOURCC('s','k','i','p'):
 	case MOV_FOURCC('j','u','n','k'):
-	  mp_msg(MSGT_DEMUX,MSGL_DBG2,"MOV: free space (len: %d)\n", len);
+	  mp_msg(MSGT_DEMUX,MSGL_DBG2,"MOV: free space (len: %"PRId64")\n", (int64_t)len);
 	  /* unused, if you edit a mov, you can use space provided by free atoms (redefining it) */
 	  break;
 	case MOV_FOURCC('p','n','o','t'):
@@ -492,7 +492,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;
@@ -560,7 +560,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){
 	  if (lschunks_intrak(demuxer, level, id, pos, len, trak) < 0)
@@ -806,7 +806,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);
@@ -1150,7 +1150,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:
@@ -1231,7 +1231,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'): {
@@ -1275,7 +1275,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;
@@ -1303,7 +1303,7 @@
 		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);
+		mp_msg(MSGT_DEMUX, MSGL_DBG2, "udta_id: %.4s (len: %"PRId64")\n", (char *)&udta_id, (int64_t)udta_len);
 		switch (udta_id)
 		{
 		    case MOV_FOURCC(0xa9,'c','p','y'):
@@ -1406,7 +1406,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 */
 
@@ -1482,7 +1482,7 @@
       str[len] = 0;
       mp_msg(MSGT_DEMUX, MSGL_V,
              "MOV: %*sHandler header: %.4s/%.4s (%.4s) %s\n", level, "",
-             &type, &subtype, &manufact, str);
+             (char *)&type, (char *)&subtype, (char *)&manufact, str);
       free(str);
       switch(bswap_32(type)) {
         case MOV_FOURCC('m','h','l','r'):
@@ -1494,7 +1494,7 @@
         default:
           mp_msg(MSGT_DEMUX, MSGL_V,
                  "MOV: unknown handler class: 0x%X (%.4s)\n",
-                 bswap_32(type), &type);
+                 bswap_32(type), (char *)&type);
       }
       break;
     }
@@ -1536,8 +1536,8 @@
         if (len < 8)
           break; // error
         mp_msg(MSGT_DEMUX, MSGL_V,
-               "MOV: %*s desc #%d: %.4s  (%d bytes)\n", level, "",
-               i, &fourcc, len - 16);
+               "MOV: %*s desc #%d: %.4s  (%"PRId64" bytes)\n", level, "",
+               i, (char *)&fourcc, (int64_t)len - 16);
         if (fourcc != trak->fourcc && i)
           mp_msg(MSGT_DEMUX, MSGL_WARN, MSGTR_MOVvariableFourCC);
 //      if(!i)
@@ -1582,7 +1582,7 @@
       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", level, "",
+             "MOV: %*sSample->Chunk mapping table!  (%d blocks) (ver:%d,flags:%d)\n", level, "",
              len, ver, flags);
       // read data:
       trak->chunkmap_size = len;
@@ -1602,7 +1602,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", level, "",
+             "MOV: %*sSample size table! (entries=%d ss=%d) (ver:%d,flags:%d)\n", level, "",
              entries, ss, ver, flags);
       trak->samplesize = ss;
       if (!ss) {
@@ -1662,7 +1662,7 @@
       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", level, "",
+             "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);
@@ -1697,7 +1697,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", level, "",
+             "MOV: %*sEdit list table (%d entries) (ver:%d,flags:%d)\n", level, "",
              entries, ver, flags);
 #if 1
       trak->editlist_size = entries;
@@ -1722,7 +1722,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)
   return 0;
@@ -1740,8 +1740,8 @@
     stream_reset(demuxer->stream);
     if(!stream_seek(demuxer->stream,priv->moov_start))
     {
-	mp_msg(MSGT_DEMUX,MSGL_ERR,"MOV: Cannot seek to the beginning of the Movie header (0x%x)\n",
-	    priv->moov_start);
+	mp_msg(MSGT_DEMUX,MSGL_ERR,"MOV: Cannot seek to the beginning of the Movie header (0x%"PRIx64")\n",
+	    (int64_t)priv->moov_start);
 	return 0;
     }
     lschunks(demuxer, 0, priv->moov_end, NULL);
@@ -1832,7 +1832,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-20060109/libmpdemux/demux_viv.c.printf	2006-01-08 19:23:32.000000000 +0100
+++ MPlayer-20060109/libmpdemux/demux_viv.c	2006-01-10 00:05:36.000000000 +0100
@@ -113,8 +113,8 @@
 	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",
-		token, stream_tell(demux->stream));
+	    mp_msg(MSGT_DEMUX, MSGL_V, "viv_text_header_parser: bad line: '%s' at ~%#"PRIx64"\n",
+		token, (int64_t)stream_tell(demux->stream));
 	    break;
 	}
 	mp_dbg(MSGT_DEMUX, MSGL_DBG3, "token: '%s' (%d bytes/%d bytes left)\n",
@@ -364,8 +364,8 @@
       audio_pos+=len;
       break;
   default:
-      mp_msg(MSGT_DEMUX,MSGL_WARN,"VIVO - unknown ID found: %02X at pos %lu contact author!\n",
-        c, stream_tell(demux->stream));
+      mp_msg(MSGT_DEMUX,MSGL_WARN,"VIVO - unknown ID found: %02X at pos %"PRIu64" contact author!\n",
+        c, (int64_t)stream_tell(demux->stream));
       return 0;
   }
 
--- MPlayer-20060109/libmpdemux/demux_pva.c.printf	2005-12-13 22:12:01.000000000 +0100
+++ MPlayer-20060109/libmpdemux/demux_pva.c	2006-01-10 00:06:20.000000000 +0100
@@ -326,7 +326,7 @@
 	{
 		if(stream_read_word(d->stream) != (('A'<<8)|'V'))
 		{
-			mp_msg(MSGT_DEMUX,MSGL_V,"demux_pva: pva_get_payload() missed a SyncWord at %ld!! Trying to sync...\n",stream_tell(d->stream));
+			mp_msg(MSGT_DEMUX,MSGL_V,"demux_pva: pva_get_payload() missed a SyncWord at %"PRId64"!! Trying to sync...\n",(int64_t)stream_tell(d->stream));
 			if(!pva_sync(d))
 			{
 				if (!d->stream->eof)
@@ -350,7 +350,7 @@
 	flags=stream_read_char(d->stream);
 	payload->is_packet_start=flags & 0x10;
 	pack_size=le2me_16(stream_read_word(d->stream));
-	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);
+	mp_msg(MSGT_DEMUX,MSGL_DBG2,"demux_pva::pva_get_payload(): pack_size=%u field read at offset %"PRIu64"\n",pack_size,(int64_t)stream_tell(d->stream)-2);
 	pva_payload_start=stream_tell(d->stream);
 	next_offset=pva_payload_start+pack_size;
 
--- MPlayer-20060109/libmpdemux/demuxer.c.printf	2006-01-09 22:39:22.000000000 +0100
+++ MPlayer-20060109/libmpdemux/demuxer.c	2006-01-09 22:58:40.000000000 +0100
@@ -717,7 +717,7 @@
 
 if ((sh_video=demuxer->video->sh) && sh_video->bih){
 int biComp=le2me_32(sh_video->bih->biCompression);
-  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 *)&biComp,
     sh_video->bih->biWidth,
     sh_video->bih->biHeight,
--- MPlayer-20060109/libmpdemux/demux_rawdv.c.printf	2005-09-04 22:36:28.000000000 +0200
+++ MPlayer-20060109/libmpdemux/demux_rawdv.c	2006-01-10 00:06:40.000000000 +0100
@@ -135,7 +135,7 @@
    rawdv_frames_t *frames = (rawdv_frames_t *)malloc(sizeof(rawdv_frames_t));
    dv_decoder_t *dv_decoder=NULL;
 
-   mp_msg(MSGT_DEMUXER,MSGL_V,"demux_open_rawdv() end_pos %d\n",demuxer->stream->end_pos);
+   mp_msg(MSGT_DEMUXER,MSGL_V,"demux_open_rawdv() end_pos %"PRId64"\n",(int64_t)demuxer->stream->end_pos);
 
    // go back to the beginning
    stream_reset(demuxer->stream);
--- MPlayer-20060109/libmpdvdkit2/ifo_print.c.printf	2005-11-06 18:35:34.000000000 +0100
+++ MPlayer-20060109/libmpdvdkit2/ifo_print.c	2006-01-09 22:58:40.000000000 +0100
@@ -763,14 +763,14 @@
     for(i = 0; i < 8; i++) {
       if(pgc->audio_control[i].present) {
 	printf("Audio stream %i control: %04x\n", 
-	       i, pgc->audio_control[i]);
+	       i, pgc->audio_control[i].present);
       }
     }
   
   for(i = 0; i < 32; i++) {
     if(pgc->subp_control[i].present) {
       printf("Subpicture stream %2i control: %08x\n", 
-	     i, pgc->subp_control[i]);
+	     i, pgc->subp_control[i].present);
     }
   }
   
--- MPlayer-20060109/libvo/font_load_ft.c.printf	2005-06-15 18:07:34.000000000 +0200
+++ MPlayer-20060109/libvo/font_load_ft.c	2006-01-09 22:58:40.000000000 +0100
@@ -179,8 +179,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-20060109/libvo/x11_common.c.printf	2005-12-07 22:52:33.000000000 +0100
+++ MPlayer-20060109/libvo/x11_common.c	2006-01-09 22:58:40.000000000 +0100
@@ -205,7 +205,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",
+           "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",
@@ -1299,7 +1299,7 @@
         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",
+               "[x11] Layered style stay on top (layer %ld).\n",
                xev.data.l[0]);
         XSendEvent(mDisplay, mRootWin, False, SubstructureNotifyMask,
                    (XEvent *) & xev);
@@ -1604,7 +1604,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);
@@ -1903,7 +1903,7 @@
         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",
+                   "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);
@@ -2347,27 +2347,27 @@
   switch ( xv_ck_info.source )
   {
     case CK_SRC_CUR:      
-      mp_msg( MSGT_VO, MSGL_V, "Using colorkey from Xv (0x%06x).\n",
+      mp_msg( MSGT_VO, MSGL_V, "Using colorkey from Xv (0x%06lx).\n",
               xv_colorkey );
       break;
     case CK_SRC_USE:
       if ( xv_ck_info.method == CK_METHOD_AUTOPAINT )
       {
         mp_msg( MSGT_VO, MSGL_V,
-                "Ignoring colorkey from MPlayer (0x%06x).\n",
+                "Ignoring colorkey from MPlayer (0x%06lx).\n",
                 xv_colorkey );
       }
       else
       {
         mp_msg( MSGT_VO, MSGL_V,
-                "Using colorkey from MPlayer (0x%06x)."
+                "Using colorkey from MPlayer (0x%06lx)."
                 " Use -colorkey to change.\n",
                 xv_colorkey );
       }
       break;
     case CK_SRC_SET:
       mp_msg( MSGT_VO, MSGL_V,
-              "Setting and using colorkey from MPlayer (0x%06x)."
+              "Setting and using colorkey from MPlayer (0x%06lx)."
               " Use -colorkey to change.\n",
               xv_colorkey );
       break;
--- MPlayer-20060109/libvo/vo_dga.c.printf	2005-09-04 22:36:29.000000000 +0200
+++ MPlayer-20060109/libvo/vo_dga.c	2006-01-09 22:58:40.000000000 +0100
@@ -811,7 +811,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",
+           "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);
 
@@ -900,7 +900,7 @@
             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",
+                       "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,
                        vo_modelines[i].redMask, vo_modelines[i].greenMask,
--- MPlayer-20060109/libvo/vo_gif89a.c.printf	2005-11-06 18:35:34.000000000 +0100
+++ MPlayer-20060109/libvo/vo_gif89a.c	2006-01-09 22:58:40.000000000 +0100
@@ -165,7 +165,7 @@
 	char LB2[] = { 1, 0, 0 };
 #endif
 
-	mp_msg(MSGT_VO, MSGL_DBG2, "GIF89a: Config entered [%ldx%ld]\n", s_width,s_height);
+	mp_msg(MSGT_VO, MSGL_DBG2, "GIF89a: Config entered [%dx%d]\n", s_width,s_height);
 	mp_msg(MSGT_VO, MSGL_DBG2, "GIF89a: With requested format: %s\n", vo_format_name(format));
 	
 	// save these for later.
--- MPlayer-20060109/libvo/vo_dxr3.c.printf	2005-11-09 01:05:36.000000000 +0100
+++ MPlayer-20060109/libvo/vo_dxr3.c	2006-01-09 22:58:40.000000000 +0100
@@ -657,7 +657,7 @@
 		
 		acq_color = ((key_color.red / 256) << 16) | ((key_color.green / 256) << 8) | key_color.blue;
 		if (key_color.pixel != KEY_COLOR) {
-			printf("VO: [dxr3] Unable to allocate exact keycolor, using closest match (%0x).\n", key_color.pixel);	
+			printf("VO: [dxr3] Unable to allocate exact keycolor, using closest match (0x%lx).\n", key_color.pixel);	
 		}
 		
 		/* Set keycolor and activate overlay */
--- MPlayer-20060109/vidix/drivers/savage_vid.c.printf	2005-03-02 00:00:05.000000000 +0100
+++ MPlayer-20060109/vidix/drivers/savage_vid.c	2006-01-09 22:58:40.000000000 +0100
@@ -1305,7 +1305,7 @@
 
 		  vinfo->frame_size = info->pitch * info->src_h;
 
-			printf("$#### destination pitch = %lu\n", info->pitch&0xffff);
+			printf("$#### destination pitch = %u\n", info->pitch&0xffff);
 
 
 
@@ -1469,7 +1469,7 @@
 	    break;
 
     }
-    fprintf(stderr,":\t\t 0x%08X = %lu\n",val,val);
+    fprintf(stderr,":\t\t 0x%08X = %u\n",val,val);
 }
 
 
--- MPlayer-20060109/mplayer.c.printf	2006-01-08 19:23:29.000000000 +0100
+++ MPlayer-20060109/mplayer.c	2006-01-09 22:58:40.000000000 +0100
@@ -1033,13 +1033,13 @@
     if (!f) return;
     fprintf(f, "----------------------------------------------------------\n");
     if (subdata->sub_uses_time) {
-	fprintf(f, "N: %s S: %02d:%02d:%02d.%02d E: %02d:%02d:%02d.%02d\n", filename, 
+	fprintf(f, "N: %s S: %02ld:%02ld:%02ld.%02ld E: %02ld:%02ld:%02ld.%02ld\n", filename, 
 		vo_sub_last->start/360000, (vo_sub_last->start/6000)%60,
 		(vo_sub_last->start/100)%60, vo_sub_last->start%100,
 		vo_sub_last->end/360000, (vo_sub_last->end/6000)%60,
 		(vo_sub_last->end/100)%60, vo_sub_last->end%100);
     } else {
-	fprintf(f, "N: %s S: %d E: %d\n", filename, vo_sub_last->start, vo_sub_last->end);
+	fprintf(f, "N: %s S: %ld E: %ld\n", filename, vo_sub_last->start, vo_sub_last->end);
     }
     for (i = 0; i < vo_sub_last->lines; i++) {
 	fprintf(f, "%s\n", vo_sub_last->text[i]);
@@ -2316,7 +2316,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);
@@ -2330,7 +2330,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);
@@ -3765,7 +3765,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;
@@ -3893,11 +3893,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;
     case MP_CMD_GET_TIME_POS : {
       float pos = 0;
--- MPlayer-20060109/mencoder.c.printf	2006-01-08 19:23:29.000000000 +0100
+++ MPlayer-20060109/mencoder.c	2006-01-09 22:58:40.000000000 +0100
@@ -950,8 +950,8 @@
     mux_a->h.dwRate *= playback_speed;
     mux_a->wf->nSamplesPerSec *= playback_speed;
     mp_msg(MSGT_MENCODER, MSGL_INFO, MSGTR_ACodecFramecopy,
-	mux_a->wf->wFormatTag, mux_a->wf->nChannels, (long)mux_a->wf->nSamplesPerSec,
-	mux_a->wf->wBitsPerSample, (long)mux_a->wf->nAvgBytesPerSec, (long)mux_a->h.dwSampleSize);
+	mux_a->wf->wFormatTag, mux_a->wf->nChannels, mux_a->wf->nSamplesPerSec,
+	mux_a->wf->wBitsPerSample, mux_a->wf->nAvgBytesPerSec, mux_a->h.dwSampleSize);
     break;
 }
 
@@ -982,16 +982,16 @@
 	if (sh_audio && mux_a->codec == ACODEC_COPY) {
 		if (playback_speed != 1.0) mp_msg(MSGT_CPLAYER, MSGL_WARN, MSGTR_NoSpeedWithFrameCopy);
 		mp_msg(MSGT_MENCODER, MSGL_INFO, MSGTR_ACodecFramecopy,
-		       mux_a->wf->wFormatTag, mux_a->wf->nChannels, (long)mux_a->wf->nSamplesPerSec,
-		       mux_a->wf->wBitsPerSample, (long)mux_a->wf->nAvgBytesPerSec, (long)mux_a->h.dwSampleSize);
+		       mux_a->wf->wFormatTag, mux_a->wf->nChannels, mux_a->wf->nSamplesPerSec,
+		       mux_a->wf->wBitsPerSample, mux_a->wf->nAvgBytesPerSec, mux_a->h.dwSampleSize);
 		if (sh_audio->wf) {
 			if ((mux_a->wf->wFormatTag != sh_audio->wf->wFormatTag) ||
 			    (mux_a->wf->nChannels != sh_audio->wf->nChannels) ||
 			    (mux_a->wf->nSamplesPerSec != sh_audio->wf->nSamplesPerSec * playback_speed))
 			{
 				mp_msg(MSGT_MENCODER, MSGL_INFO, MSGTR_ACodecFramecopy,
-				       sh_audio->wf->wFormatTag, sh_audio->wf->nChannels, (long)(sh_audio->wf->nSamplesPerSec * playback_speed),
-				       sh_audio->wf->wBitsPerSample, (long)sh_audio->wf->nAvgBytesPerSec, 0L);
+				       sh_audio->wf->wFormatTag, sh_audio->wf->nChannels, (int)(sh_audio->wf->nSamplesPerSec * playback_speed),
+				       sh_audio->wf->wBitsPerSample, sh_audio->wf->nAvgBytesPerSec, 0);
 				mp_msg(MSGT_MENCODER,MSGL_FATAL,MSGTR_AudioCopyFileMismatch);
 				mencoder_exit(1,NULL);
 			}
@@ -1001,8 +1001,8 @@
 			    (mux_a->wf->nSamplesPerSec != sh_audio->samplerate * playback_speed))
 			{
 				mp_msg(MSGT_MENCODER, MSGL_INFO, MSGTR_ACodecFramecopy,
-				       sh_audio->wf->wFormatTag, sh_audio->wf->nChannels, (long)(sh_audio->wf->nSamplesPerSec * playback_speed),
-				       sh_audio->wf->wBitsPerSample, (long)sh_audio->wf->nAvgBytesPerSec, 0L);
+				       sh_audio->wf->wFormatTag, sh_audio->wf->nChannels, (int)(sh_audio->wf->nSamplesPerSec * playback_speed),
+				       sh_audio->wf->wBitsPerSample, sh_audio->wf->nAvgBytesPerSec, 0);
 				mp_msg(MSGT_MENCODER,MSGL_FATAL,MSGTR_AudioCopyFileMismatch);
 				mencoder_exit(1,NULL);
 			}


More information about the MPlayer-dev-eng mailing list