[MPlayer-dev-eng] [PATCH] loader printf format fixes

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Sat Jul 31 21:22:09 CEST 2004


Attached.

-- 
MPlayer RPMs maintainer: http://greysector.rangers.eu.org/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-20040103/loader/qtx/qtxsdk/components.h.loader-printf	Sat Nov  8 01:29:24 2003
+++ MPlayer-20040103/loader/qtx/qtxsdk/components.h	Sat Jan  3 17:19:41 2004
@@ -634,14 +634,14 @@
 
 
     printf("=============== ImageDescription at %p ==================\n",xxx);
-    printf("idSize=0x%X  fourcc=0x%08X\n",id->idSize,id->cType);
-    printf("ver=%d rev=%d vendor=0x%08X\n",id->version,id->revisionLevel,id->vendor);
-    printf("tempQ=%d spatQ=%d  dim: %d x %d  dpi: %d x %d  depth: %d\n",
+    printf("idSize=0x%lX  fourcc=0x%08X\n",id->idSize,id->cType);
+    printf("ver=%d rev=%d vendor=0x%08lX\n",id->version,id->revisionLevel,id->vendor);
+    printf("tempQ=%ld spatQ=%ld  dim: %d x %d  dpi: %ld x %ld  depth: %d\n",
 	id->temporalQuality,id->spatialQuality,
 	id->width, id->height,
 	id->hRes, id->vRes,
 	id->depth);
-    printf("dataSize=%d frameCount=%d clutID=%d\n",id->dataSize, id->frameCount, id->clutID);
+    printf("dataSize=%ld frameCount=%d clutID=%d\n",id->dataSize, id->frameCount, id->clutID);
     printf("name='%.*s'\n",((char*)(&id->name))[0],((char*)(&id->name))+1);
     x=((char*)(&id->clutID))+2;
     if(id->idSize>sizeof(ImageDescription)){
@@ -657,7 +657,7 @@
 }
 
 static inline void dump_MatrixRecord(char* title, MatrixRecord *m){
-    printf("%s: [%d %d %d][%d %d %d][%d %d %d]\n",title,
+    printf("%s: [%ld %ld %ld][%ld %ld %ld][%ld %ld %ld]\n",title,
 	m->matrix[0][0],m->matrix[0][1],m->matrix[0][2],
 	m->matrix[1][0],m->matrix[1][1],m->matrix[1][2],
 	m->matrix[2][0],m->matrix[2][1],m->matrix[2][2]);
@@ -668,9 +668,9 @@
     printf("=============== PixMap at %p ==================\n",xxx);
     printf("base=%p  stride=%d\n",p->baseAddr, p->rowBytes);
     dump_Rect("bounds",&p->bounds);
-    printf("pmVersion=0x%X packType=0x%X\n packSize=0x%X\n",
+    printf("pmVersion=0x%X packType=0x%X\n packSize=0x%lX\n",
 	p->pmVersion,p->packType, p->packSize);
-    printf("hRes=0x%X vRes=0x%X pixelType=0x%X pixelSize=0x%X\n",
+    printf("hRes=0x%lX vRes=0x%lX pixelType=0x%X pixelSize=0x%X\n",
 	p->hRes,p->vRes,p->pixelType,p->pixelSize);
     printf("cmpCount=0x%X cmpSize=0x%X pixelFormat=0x%X\n",
 	p->cmpCount,p->cmpSize,p->pixelFormat);
@@ -682,11 +682,11 @@
     CodecCapabilities* cc=xxx;
     if(!xxx) return;
     printf("=============== CodecCapabilities at %p =================\n",xxx);
-    printf("flags=0x%X  flags2=0x%X\n",cc->flags,cc->flags2);
+    printf("flags=0x%lX  flags2=0x%lX\n",cc->flags,cc->flags2);
     printf("wantedPixelSize=%d extendWidth=%d extendHeight=%d band=%d+%d\n",
 	cc->wantedPixelSize,cc->extendWidth,cc->extendHeight,
 	cc->bandMin,cc->bandInc);
-    printf("pad=0x%X  time=0x%X\n",cc->pad,cc->time);
+    printf("pad=0x%X  time=0x%lX\n",cc->pad,cc->time);
     printf("=========================================================\n");
 }
 
@@ -696,7 +696,7 @@
     int i;
     if(!xxx) return;
     printf("=============== CodecDecompressParams at %p ==================\n",xxx);
-    printf("sequenceID=%d\n",cd->sequenceID);
+    printf("sequenceID=%ld\n",cd->sequenceID);
     idh=cd->imageDescription;
     if(idh && idh[0]) dump_ImageDescription(idh[0]);
     
@@ -706,8 +706,8 @@
     }
     printf("\n");
     
-    printf("data=%p  size=%d\n",cd->data,cd->bufferSize);
-    printf("frameno=%d  lines: %d .. %d   condflags=0x%X  callerflags=0x%X\n",
+    printf("data=%p  size=%ld\n",cd->data,cd->bufferSize);
+    printf("frameno=%ld  lines: %ld .. %ld   condflags=0x%lX  callerflags=0x%X\n",
 	cd->frameNumber, cd->startLine, cd->stopLine, cd->conditionFlags,cd->callerFlags);
 //    printf("maskBits=%p mattePixMap=%p\n",
 //	cd->maskBits,cd->mattePixMap);
@@ -715,21 +715,21 @@
 //    if(cd->mattePixMap) dump_PixMap(cd->mattePixMap);
     if(cd->matrix) dump_MatrixRecord("matrix",cd->matrix);
     if(cd->capabilities) dump_CodecCapabilities(cd->capabilities);
-    printf("accuracy=%d  transferMode=%d  matrixFlags=0x%X matrixType=%d\n",
-	(int)cd->accuracy, (int)cd->transferMode, (int)cd->matrixFlags, (int)cd->matrixType);
+    printf("accuracy=%ld  transferMode=%d  matrixFlags=0x%X matrixType=%d\n",
+	cd->accuracy, cd->transferMode, cd->matrixFlags, cd->matrixType);
     printf("srcrect: %d;%d - %d;%d\n",cd->srcRect.top,cd->srcRect.left,cd->srcRect.bottom,cd->srcRect.right);
     printf("dstrect: %d;%d - %d;%d\n",cd->dstRect.top,cd->dstRect.left,cd->dstRect.bottom,cd->dstRect.right);
     printf("wantedDestinationPixelTypes=%p\n",cd->wantedDestinationPixelTypes);
     if(cd->wantedDestinationPixelTypes){
-	unsigned int* p=cd->wantedDestinationPixelTypes;
+	int** p=cd->wantedDestinationPixelTypes;
 	while(p[0]){
-	    printf("  0x%08X %.4s\n",p[0],&p[0]);
+	    printf("  %p %.4s\n",p[0],(char *)&p[0]);
 	    ++p;
 	}
     }
-    printf("screenFloodMethod=%d value=%d  preferredOffscreenPixelSize=%d\n",
+    printf("screenFloodMethod=%ld value=%ld  preferredOffscreenPixelSize=%d\n",
 	cd->screenFloodMethod, cd->screenFloodValue, cd->preferredOffscreenPixelSize);
-    printf("callbacks: progress=%p compl=%p data=%p ftime=%p srcdata=%p sync=%p\n",
+    printf("callbacks: progress=%#llx compl=%#llx data=%#llx ftime=%p srcdata=%p sync=%p\n",
      cd->progressProcRecord, cd->completionProcRecord,
      cd->dataProcRecord, cd->frameTime, cd->sourceData, cd->syncFrameTime);
 //    printf("\n");
--- MPlayer-20040103/loader/dshow/DS_Filter.c.loader-printf	Sat Jan  3 17:19:41 2004
+++ MPlayer-20040103/loader/dshow/DS_Filter.c	Sat Jan  3 17:19:41 2004
@@ -261,7 +261,7 @@
     if (!init)
     {
 	DS_Filter_Destroy(This);
-	printf("Warning: DS_Filter() %s.  (DLL=%.200s, r=0x%x)\n", em, dllname, result);
+	printf("Warning: DS_Filter() %s.  (DLL=%.200s, r=0x%lx)\n", em, dllname, result);
         This = 0;
     }
     return This;


More information about the MPlayer-dev-eng mailing list