[MPlayer-dev-eng] [PATCH] Yet another batch of warning fixes :->

Dominik Mierzejewski dominik at rangers.eu.org
Tue Dec 10 01:01:29 CET 2002


Just comments, please. If there are no outstanding issues with these,
I can apply them myself.
Patch #1 touches only loader/ subdir (yes, I know - nobody should mess with
loader - that's why it's separate)
Patch #2 takes care of the rest (but not all yet) warnings
 
-- 
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-20021209/loader/dshow/DS_VideoDecoder.c.loader	Sun Sep 22 04:33:27 2002
+++ MPlayer-20021209/loader/dshow/DS_VideoDecoder.c	Tue Dec 10 00:19:21 2002
@@ -35,6 +35,7 @@
 #include "DS_VideoDecoder.h"
 
 #include "../wine/winerror.h"
+#include "../ldt_keeper.h"
 
 #ifndef NOAVIFILE_HEADERS
 #define VFW_E_NOT_RUNNING               0x80040226
@@ -66,7 +67,7 @@
 struct _ct {
 		unsigned int bits;
 		fourcc_t fcc;
-		GUID *subtype;
+		const GUID *subtype;
 		int cap;
 	    };
             
@@ -224,7 +225,7 @@
 		if (!result)
 		{
 		    this->m_Caps = (this->m_Caps | c->cap);
-		    printf("%.4s ", &c->fcc);
+		    printf("%.4s ", (char *)&c->fcc);
 		}
 	    }
 	    printf("\n");
--- MPlayer-20021209/loader/dshow/DS_AudioDecoder.c.loader	Wed Nov 27 00:40:57 2002
+++ MPlayer-20021209/loader/dshow/DS_AudioDecoder.c	Tue Dec 10 00:19:21 2002
@@ -24,6 +24,7 @@
 };
 
 #include "DS_AudioDecoder.h"
+#include "../ldt_keeper.h"
 
 #include <string.h>
 #include <stdio.h>
--- MPlayer-20021209/loader/dshow/DS_Filter.c.loader	Wed Nov 27 00:40:57 2002
+++ MPlayer-20021209/loader/dshow/DS_Filter.c	Tue Dec 10 00:19:21 2002
@@ -236,7 +236,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;
--- MPlayer-20021209/loader/qtx/qtxsdk/components.h.loader	Tue Dec  3 20:58:42 2002
+++ MPlayer-20021209/loader/qtx/qtxsdk/components.h	Tue Dec 10 00:19:21 2002
@@ -613,14 +613,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)){
@@ -636,7 +636,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]);
@@ -647,9 +647,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);
@@ -661,11 +661,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");
 }
 
@@ -675,7 +675,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]);
     
@@ -685,8 +685,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);
@@ -694,21 +694,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-20021209/loader/wine/windef.h.loader	Sat Aug 31 03:44:54 2002
+++ MPlayer-20021209/loader/wine/windef.h	Tue Dec 10 00:19:21 2002
@@ -156,8 +156,8 @@
 typedef int             INT;
 typedef unsigned int    UINT;
 typedef unsigned short  WORD;
-typedef unsigned int    DWORD;
-typedef unsigned int    ULONG;
+typedef unsigned long   DWORD;
+typedef unsigned long   ULONG;
 typedef unsigned char   BYTE;
 typedef long            LONG;
 typedef short           SHORT;
--- MPlayer-20021209/loader/dmo/DMO_VideoDecoder.c.loader	Tue Nov 26 23:54:11 2002
+++ MPlayer-20021209/loader/dmo/DMO_VideoDecoder.c	Tue Dec 10 00:19:21 2002
@@ -8,6 +8,7 @@
 #include "guids.h"
 #include "interfaces.h"
 #include "registry.h"
+#include "../ldt_keeper.h"
 
 #ifndef NOAVIFILE_HEADERS
 #include "videodecoder.h"
@@ -234,7 +235,7 @@
 		if (!result)
 		{
 		    this->m_Caps = (this->m_Caps | c->cap);
-		    printf("%.4s ", &c->fcc);
+		    printf("%.4d ", c->fcc);
 		}
 	    }
 	    printf("\n");
--- MPlayer-20021209/loader/dmo/DMO_AudioDecoder.c.loader	Sun Dec  1 17:38:56 2002
+++ MPlayer-20021209/loader/dmo/DMO_AudioDecoder.c	Tue Dec 10 00:19:21 2002
@@ -10,6 +10,7 @@
 #include "except.h"
 #else
 #include "libwin32.h"
+#include "ldt_keeper.h"
 #endif
 
 #include "DMO_Filter.h"
@@ -33,6 +34,7 @@
 #define __MODULE__ "DirectShow audio decoder"
 
 typedef long STDCALL (*GETCLASS) (GUID*, GUID*, void**);
+extern void print_wave_header(WAVEFORMATEX *h);
 
 DMO_AudioDecoder * DMO_AudioDecoder_Open(char* dllname, GUID* guid, WAVEFORMATEX* wf,int out_channels)
 //DMO_AudioDecoder * DMO_AudioDecoder_Create(const CodecInfo * info, const WAVEFORMATEX* wf)
@@ -83,8 +85,8 @@
     this->m_sDestType.cbFormat=18; //pWF->cbSize;
     this->m_sDestType.pbFormat=this->m_sVhdr2;
 
-print_wave_header(this->m_sVhdr);
-print_wave_header(this->m_sVhdr2);
+print_wave_header((WAVEFORMATEX *)this->m_sVhdr);
+print_wave_header((WAVEFORMATEX *)this->m_sVhdr2);
 
         this->m_pDMO_Filter = DMO_FilterCreate(dllname, guid, &this->m_sOurType, &this->m_sDestType);
 	if( !this->m_pDMO_Filter ) {
@@ -109,8 +111,8 @@
 {
     DMO_OUTPUT_DATA_BUFFER db;
     CMediaBuffer* bufferin;
-    unsigned int written = 0;
-    unsigned int read = 0;
+    unsigned long written = 0;
+    unsigned long read = 0;
     int r = 0;
 
     if (!in_data || !out_data)
--- MPlayer-20021209/loader/win32.c.loader	Mon Dec  9 22:53:10 2002
+++ MPlayer-20021209/loader/win32.c	Tue Dec 10 00:19:21 2002
@@ -40,6 +40,7 @@
 #include "registry.h"
 #include "loader.h"
 #include "com.h"
+#include "ext.h"
 
 #include <stdlib.h>
 #include <assert.h>
@@ -820,7 +821,7 @@
 {
     int i;
     void *object;
-    int ret;
+    void *ret;
 
     dbgprintf("WaitForMultipleObjects(%d, 0x%x, %d, duration %d) =>\n",
 	count, objects, WaitAll, duration);
@@ -846,7 +847,7 @@
 static HANDLE WINAPI expCreateMutexA(void *pSecAttr,
 		    char bInitialOwner, const char *name)
 {
-    HANDLE mlist = expCreateEventA(pSecAttr, 0, 0, name);
+    HANDLE mlist = (HANDLE)expCreateEventA(pSecAttr, 0, 0, name);
     
     if (name)
 	dbgprintf("CreateMutexA(0x%x, %d, '%s') => 0x%x\n",
@@ -891,7 +892,9 @@
     /* FIXME: better values for the two entries below... */
     static int cache = 0;
     static SYSTEM_INFO cachedsi;
+#ifndef MPLAYER
     unsigned int regs[4];
+#endif
     dbgprintf("GetSystemInfo(%p) =>\n", si);
 
     if (cache) {
@@ -1376,6 +1379,9 @@
     pthread_mutex_unlock(&(cs->mutex));
     return;
 }
+
+static void expfree(void* mem); /* forward declaration */
+
 static void WINAPI expDeleteCriticalSection(CRITICAL_SECTION *c)
 {
 #ifdef CRITSECS_NEWTYPE
@@ -2492,7 +2498,7 @@
 
     if (lpmi->cbSize == sizeof(MONITORINFOEX))
     {
-	LPMONITORINFOEX lpmiex = lpmi;
+	LPMONITORINFOEX lpmiex = (LPMONITORINFOEX)lpmi;
 	dbgprintf("MONITORINFOEX!\n");
 	strncpy(lpmiex->szDevice, "Monitor1", CCHDEVICENAME);
     }
@@ -3529,9 +3535,9 @@
 #endif
 #else
     if (strrchr(lpFileName, '\\'))
-	*lpFilePart = strrchr(lpFileName, '\\');
+	lpFilePart = strrchr(lpFileName, '\\');
     else
-	*lpFilePart = lpFileName;
+	lpFilePart = lpFileName;
 #endif
     strcpy(lpBuffer, lpFileName);
 //    strncpy(lpBuffer, lpFileName, rindex(lpFileName, '\\')-lpFileName);
@@ -4403,7 +4409,7 @@
 
 static void WINAPI expExitProcess( DWORD status )
 {
-    printf("EXIT - code %d\n",status);
+    printf("EXIT - code %ld\n",status);
     exit(status);
 }
 
@@ -4462,7 +4468,7 @@
 static int expDirectDrawCreate(void)
 {
     dbgprintf("DirectDrawCreate(...) => NULL\n");
-    return NULL;
+    return 0;
 }
 
 #if 1
@@ -4488,8 +4494,8 @@
     dbgprintf("CreatePalette(%x) => NULL\n", lpgpl);
 
     i = sizeof(LOGPALETTE)+((lpgpl->palNumEntries-1)*sizeof(PALETTEENTRY));
-    test = malloc(i);
-    memcpy(test, lpgpl, i);
+    test = (HPALETTE)malloc(i);
+    memcpy((void *)test, lpgpl, i);
 
     return test;
 }
@@ -5092,7 +5098,9 @@
     }
 #endif
 
+#ifdef LOADLIB_TRY_NATIVE
 no_dll:
+#endif
     if(pos>150)return 0;
     sprintf(export_names[pos], "%s:%d", library, ordinal);
     return add_stub();
--- MPlayer-20021209/loader/module.c.loader	Tue Dec  3 20:58:41 2002
+++ MPlayer-20021209/loader/module.c	Tue Dec 10 00:19:21 2002
@@ -430,10 +430,10 @@
 
 //	    dispatch_addr = GetProcAddress(wm->module, "theQuickTimeDispatcher", TRUE);
 	    dispatch_addr = PE_FindExportedFunction(wm, "theQuickTimeDispatcher", TRUE);
-	    if (dispatch_addr == 0x62924c30)
+	    if (dispatch_addr == (void *)0x62924c30)
 	    {
 	        fprintf(stderr, "QuickTime5 DLLs found\n");
-		ptr = 0x62b75ca4; // dispatch_ptr
+		ptr = (void **)0x62b75ca4; // dispatch_ptr
 	        for (i=0;i<5;i++)  ((char*)0x6299e842)[i]=0x90; // make_new_region ?
 	        for (i=0;i<28;i++) ((char*)0x6299e86d)[i]=0x90; // call__call_CreateCompatibleDC ?
 		for (i=0;i<5;i++)  ((char*)0x6299e898)[i]=0x90; // jmp_to_call_loadbitmap ?
@@ -458,10 +458,10 @@
 		((char *)0x6288e0ae)[0] = 0xc3; // font/dc remover
 		for (i=0;i<24;i++) ((char*)0x6287a1ad)[i]=0x90; // destroy window
 #endif
-	    } else if (dispatch_addr == 0x6693b330)
+	    } else if (dispatch_addr == (void *)0x6693b330)
 	    {
     		fprintf(stderr, "QuickTime6 DLLs found\n");
-		ptr = 0x66bb9524; // dispatcher_ptr
+		ptr = (void **)0x66bb9524; // dispatcher_ptr
 		for (i=0;i<5;i++)  ((char *)0x66a730cc)[i]=0x90; // make_new_region
 		for (i=0;i<28;i++) ((char *)0x66a730f7)[i]=0x90; // call__call_CreateCompatibleDC
 		for (i=0;i<5;i++)  ((char *)0x66a73122)[i]=0x90; // jmp_to_call_loadbitmap
@@ -469,9 +469,9 @@
 		for (i=0;i<96;i++) ((char *)0x66aac852)[i]=0x90; // disable threads
 	    } else
 	    {
-	        fprintf(stderr, "Unsupported QuickTime version (0x%x)\n",
+	        fprintf(stderr, "Unsupported QuickTime version (0x%p)\n",
 		    dispatch_addr);
-		return NULL;
+		return 0;
 	    }
 
 	    fprintf(stderr,"QuickTime.qts patched!!! old entry=%p\n",ptr[0]);
@@ -724,15 +724,15 @@
   // memory management:
   case 0x150011: //NewPtrClear
   case 0x150012: //NewPtrSysClear
-      reg->eax=malloc(((u_int32_t *)stack_base)[1]);
-      memset(reg->eax,0,((u_int32_t *)stack_base)[1]);
+      reg->eax=(u_int32_t)malloc(((u_int32_t *)stack_base)[1]);
+      memset((void *)reg->eax,0,((u_int32_t *)stack_base)[1]);
 #ifdef DEBUG_QTX_API
       printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax);
 #endif
       return 1;
   case 0x15000F: //NewPtr
   case 0x150010: //NewPtrSys
-      reg->eax=malloc(((u_int32_t *)stack_base)[1]);
+      reg->eax=(u_int32_t)malloc(((u_int32_t *)stack_base)[1]);
 #ifdef DEBUG_QTX_API
       printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax);
 #endif
@@ -741,7 +741,7 @@
       if(((u_int32_t *)stack_base)[1]>=0x60000000)
           printf("WARNING! Invalid Ptr handle!\n");
       else
-          free(((u_int32_t *)stack_base)[1]);
+          free((void *)((u_int32_t *)stack_base)[1]);
       reg->eax=0;
 #ifdef DEBUG_QTX_API
       printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax);
@@ -956,7 +956,7 @@
       report_entry = report_func;
       report_ret   = report_func_ret;
       wrapper_target=retproc;
-      retproc=wrapper;
+      retproc=(FARPROC)wrapper;
     }
 
     }
--- MPlayer-20021209/loader/driver.c.loader	Fri Sep 13 21:43:13 2002
+++ MPlayer-20021209/loader/driver.c	Tue Dec 10 00:19:21 2002
@@ -17,6 +17,7 @@
 #include "registry.h"
 #include "ldt_keeper.h"
 #include "driver.h"
+#include "ext.h"
 
 extern char* def_path;
 
-------------- next part --------------
--- MPlayer-20021209/TOOLS/subfont-c/subfont.c.warn	Sun Aug 18 10:21:24 2002
+++ MPlayer-20021209/TOOLS/subfont-c/subfont.c	Tue Dec 10 00:19:21 2002
@@ -274,7 +274,7 @@
 #ifndef NEW_DESC
 	fprintf(f, "charspace %i\n",	-2*padding);
 #endif
-	fprintf(f, "height %i\n",	f266ToInt(face->size->metrics.height));
+	fprintf(f, "height %li\n",	f266ToInt(face->size->metrics.height));
 #ifdef NEW_DESC
 	fprintf(f, "ascender %i\n",	f266CeilToInt(face->size->metrics.ascender));
 	fprintf(f, "descender %i\n",	f266FloorToInt(face->size->metrics.descender));
@@ -303,7 +303,7 @@
 	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,
+		WARNING("Glyph for char 0x%02lx|U+%04lX|%c not found.", code, character,
 			 code<' '||code>255 ? '.':code);
 		continue;
 	    }
@@ -312,7 +312,7 @@
 	// load glyph
 	error = FT_Load_Glyph(face, glyph_index, load_flags);
 	if (error) {
-	    WARNING("FT_Load_Glyph 0x%02x (char 0x%02x|U+%04X) failed.", glyph_index, code, character);
+	    WARNING("FT_Load_Glyph 0x%02x (char 0x%02lx|U+%04lX) failed.", glyph_index, code, character);
 	    continue;
 	}
 	slot = face->glyph;
@@ -321,7 +321,7 @@
 	if (slot->format != ft_glyph_format_bitmap) {
 	    error = FT_Render_Glyph(slot, ft_render_mode_normal);
 	    if (error) {
-		WARNING("FT_Render_Glyph 0x%04x (char 0x%02x|U+%04X) failed.", glyph_index, code, character);
+		WARNING("FT_Render_Glyph 0x%04x (char 0x%02lx|U+%04lX) failed.", glyph_index, code, character);
 		continue;
 	    }
 	}
@@ -329,7 +329,7 @@
 	// extract glyph image
 	error = FT_Get_Glyph(slot, (FT_Glyph*)&glyph);
 	if (error) {
-	    WARNING("FT_Get_Glyph 0x%04x (char 0x%02x|U+%04X) failed.", glyph_index, code, character);
+	    WARNING("FT_Get_Glyph 0x%04x (char 0x%02lx|U+%04lX) failed.", glyph_index, code, character);
 	    continue;
 	}
 	glyphs[glyphs_count++] = (FT_Glyph)glyph;
@@ -365,7 +365,7 @@
 	pen_xa = pen_x + f266ToInt(slot->advance.x) + 2*padding;
 
 	/* font.desc */
-	fprintf(f, "0x%04x %i %i;\tU+%04X|%c\n", unicode_desc ? character:code,
+	fprintf(f, "0x%04lx %i %i;\tU+%04lX|%c\n", unicode_desc ? character:code,
 		pen_x,						// bitmap start
 		pen_xa-1,					// bitmap end
 		character, code<' '||code>255 ? '.':code);
--- MPlayer-20021209/liba52/imdct.c.warn	Sat Nov 23 11:58:12 2002
+++ MPlayer-20021209/liba52/imdct.c	Tue Dec 10 00:19:21 2002
@@ -392,8 +392,8 @@
 #endif
 #include "srfftp_3dnow.h"
 
-const i_cmplx_t x_plus_minus_3dnow __attribute__ ((aligned (8))) = { 0x00000000UL, 0x80000000UL }; 
-const i_cmplx_t x_minus_plus_3dnow __attribute__ ((aligned (8))) = { 0x80000000UL, 0x00000000UL }; 
+const i_cmplx_t x_plus_minus_3dnow __attribute__ ((aligned (8))) = {{ 0x00000000UL, 0x80000000UL }}; 
+const i_cmplx_t x_minus_plus_3dnow __attribute__ ((aligned (8))) = {{ 0x80000000UL, 0x00000000UL }}; 
 const complex_t HSQRT2_3DNOW __attribute__ ((aligned (8))) = { 0.707106781188, 0.707106781188 };
 
 #undef HAVE_3DNOWEX
--- MPlayer-20021209/libaf/af_resample.c.warn	Tue Nov 12 13:33:54 2002
+++ MPlayer-20021209/libaf/af_resample.c	Tue Dec 10 00:19:21 2002
@@ -48,7 +48,8 @@
 // Macro to add data to circular que 
 #define ADDQUE(xi,xq,in)\
   xq[xi]=xq[xi+L]=(*in);\
-  xi=(--xi)&(L-1);
+  xi=(xi-1)&(L-1);\
+  xi--;
 
 
 
--- MPlayer-20021209/libao2/pl_resample.c.warn	Thu Nov  7 00:54:23 2002
+++ MPlayer-20021209/libao2/pl_resample.c	Tue Dec 10 00:19:21 2002
@@ -171,7 +171,7 @@
   if(pl_resample.up==pl_resample.dn){
     register int16_t*	in    = ((int16_t*)ao_plugin_data.data);
     register int16_t* 	end   = in+ao_plugin_data.len/2;
-    while(in < end) *in=(*in++)>>1;
+    while(in < end) { *in=(*in)>>1; in++; }
     return 1;
   }
   if(pl_resample.up>pl_resample.dn)
--- MPlayer-20021209/libmpcodecs/vd_qtvideo.c.warn	Tue Dec  3 20:58:41 2002
+++ MPlayer-20021209/libmpcodecs/vd_qtvideo.c	Tue Dec 10 00:19:21 2002
@@ -8,6 +8,10 @@
 #include "mp_msg.h"
 #include "vd_internal.h"
 
+#ifdef USE_WIN32DLL
+#include "ldt_keeper.h"
+#endif
+
 static vd_info_t info = {
 	"Quicktime Video decoder",
 	"qtvideo",
@@ -100,20 +104,20 @@
 
     handler = LoadLibraryA("qtmlClient.dll");
 
-    InitializeQTML = GetProcAddress(handler, "InitializeQTML");
-    EnterMovies = GetProcAddress(handler, "EnterMovies");
-    FindNextComponent = GetProcAddress(handler, "FindNextComponent");
-    CountComponents = GetProcAddress(handler, "CountComponents");
-    GetComponentInfo = GetProcAddress(handler, "GetComponentInfo");
-    OpenComponent = GetProcAddress(handler, "OpenComponent");
-    ImageCodecInitialize = GetProcAddress(handler, "ImageCodecInitialize");
-    ImageCodecGetCodecInfo = GetProcAddress(handler, "ImageCodecGetCodecInfo");
-    ImageCodecBeginBand = GetProcAddress(handler, "ImageCodecBeginBand");
-    ImageCodecPreDecompress = GetProcAddress(handler, "ImageCodecPreDecompress");
-    ImageCodecBandDecompress = GetProcAddress(handler, "ImageCodecBandDecompress");
-    GetGWorldPixMap = GetProcAddress(handler, "GetGWorldPixMap");
-    QTNewGWorldFromPtr = GetProcAddress(handler, "QTNewGWorldFromPtr");
-    NewHandleClear = GetProcAddress(handler, "NewHandleClear");
+    InitializeQTML = (OSErr (*)(long))GetProcAddress(handler, "InitializeQTML");
+    EnterMovies = (OSErr (*)(void))GetProcAddress(handler, "EnterMovies");
+    FindNextComponent = (Component (*)(Component,ComponentDescription*))GetProcAddress(handler, "FindNextComponent");
+    CountComponents = (long (*)(ComponentDescription*))GetProcAddress(handler, "CountComponents");
+    GetComponentInfo = (OSErr (*)(Component,ComponentDescription*,Handle,Handle,Handle))GetProcAddress(handler, "GetComponentInfo");
+    OpenComponent = (ComponentInstance (*)(Component))GetProcAddress(handler, "OpenComponent");
+    ImageCodecInitialize = (ComponentResult (*)(ComponentInstance,ImageSubCodecDecompressCapabilities *))GetProcAddress(handler, "ImageCodecInitialize");
+    ImageCodecGetCodecInfo = (ComponentResult (*)(ComponentInstance,CodecInfo *))GetProcAddress(handler, "ImageCodecGetCodecInfo");
+    ImageCodecBeginBand = (ComponentResult (*)(ComponentInstance,CodecDecompressParams *,ImageSubCodecDecompressRecord *,long))GetProcAddress(handler, "ImageCodecBeginBand");
+    ImageCodecPreDecompress = (ComponentResult (*)(ComponentInstance,CodecDecompressParams *))GetProcAddress(handler, "ImageCodecPreDecompress");
+    ImageCodecBandDecompress = (ComponentResult (*)(ComponentInstance,CodecDecompressParams *))GetProcAddress(handler, "ImageCodecBandDecompress");
+    GetGWorldPixMap = (PixMapHandle (*)(GWorldPtr))GetProcAddress(handler, "GetGWorldPixMap");
+    QTNewGWorldFromPtr = (OSErr(*)(GWorldPtr *,OSType,const Rect *,CTabHandle,void*,GWorldFlags,void *,long))GetProcAddress(handler, "QTNewGWorldFromPtr");
+    NewHandleClear = (OSErr(*)(Size))GetProcAddress(handler, "NewHandleClear");
     //     = GetProcAddress(handler, "");
     
     if(!InitializeQTML || !EnterMovies || !FindNextComponent || !ImageCodecBandDecompress){
@@ -123,7 +127,7 @@
 
     result=InitializeQTML(6+16);
 //    result=InitializeQTML(0);
-    printf("InitializeQTML returned %i\n",result);
+    printf("InitializeQTML returned %li\n",result);
 //    result=EnterMovies();
 //    printf("EnterMovies->%d\n",result);
 
@@ -145,7 +149,7 @@
     desc.componentFlags=0;
     desc.componentFlagsMask=0;
 
-    printf("Count = %d\n",CountComponents(&desc));
+    printf("Count = %ld\n",CountComponents(&desc));
 #if 0
     memset(&desc,0,sizeof(desc));
     while((prev=FindNextComponent(prev,&desc))){
@@ -168,18 +172,18 @@
 	printf("Cannot find requested component\n");
 	return(0);
     }
-    printf("Found it! ID = 0x%X\n",prev);
+    printf("Found it! ID = %p\n",prev);
 
     ci=OpenComponent(prev);
     printf("ci=%p\n",ci);
 
     memset(&icap,0,sizeof(icap));
     cres=ImageCodecInitialize(ci,&icap);
-    printf("ImageCodecInitialize->%p  size=%d (%d)\n",cres,icap.recordSize,icap.decompressRecordSize);
+    printf("ImageCodecInitialize->%#lx  size=%ld (%ld)\n",cres,icap.recordSize,icap.decompressRecordSize);
     
     memset(&cinfo,0,sizeof(cinfo));
     cres=ImageCodecGetCodecInfo(ci,&cinfo);
-    printf("Flags: compr: 0x%X  decomp: 0x%X format: 0x%X\n",
+    printf("Flags: compr: 0x%lX  decomp: 0x%lX format: 0x%lX\n",
 	cinfo.compressFlags, cinfo.decompressFlags, cinfo.formatFlags);
     printf("Codec name: %.*s\n",((unsigned char*)&cinfo.typeName)[0],
 	((unsigned char*)&cinfo.typeName)+1);
@@ -201,7 +205,7 @@
   fclose(f);
 }
 #else
-    printf("ImageDescription size: %d\n",((ImageDescription*)(sh->ImageDesc))->idSize);
+    printf("ImageDescription size: %ld\n",((ImageDescription*)(sh->ImageDesc))->idSize);
     framedescHandle=(ImageDescriptionHandle)NewHandleClear(((ImageDescription*)(sh->ImageDesc))->idSize);
     memcpy(*framedescHandle,sh->ImageDesc,((ImageDescription*)(sh->ImageDesc))->idSize);
 #endif
@@ -209,7 +213,7 @@
 //    result = FindCodec ('SVQ1',anyCodec,&compressor,&decompressor );                 
 //    printf("FindCodec SVQ1 returned:%i compressor: 0x%X decompressor: 0x%X\n",result,compressor,decompressor);
 
-    sh->context = kYUVSPixelFormat;
+    sh->context = (void *)kYUVSPixelFormat;
 #if 1
     {
 	int imgfmt = sh->codec->outfmt[sh->outfmtidx];
@@ -248,8 +252,8 @@
 	    printf("Unknown requested csp\n");
 	    return(0);    
     }
-    printf("imgfmt: %s qt_imgfmt: %.4s\n", vo_format_name(imgfmt), &qt_imgfmt);
-    sh->context = qt_imgfmt;
+    printf("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;
     }
 #else
@@ -282,14 +286,14 @@
     result = QTNewGWorldFromPtr(
         &OutBufferGWorld,  
 //        kYUVSPixelFormat, //pixel format of new GWorld == YUY2
-	sh->context,
+	(long)sh->context,
         &OutBufferRect,   //we should benchmark if yvu9 is faster for svq3, too
         0, 
         0, 
         0, 
         mpi->planes[0],
         mpi->stride[0]);
-    printf("NewGWorldFromPtr returned:%d\n",65536-(result&0xffff));
+    printf("NewGWorldFromPtr returned:%ld\n",65536-(result&0xffff));
 //    if (65536-(result&0xFFFF) != 10000)
 //	return NULL;
 
@@ -325,7 +329,7 @@
     decpar.dstPixMap = **GetGWorldPixMap( OutBufferGWorld);//destPixmap; 
   
     cres=ImageCodecPreDecompress(ci,&decpar);
-    printf("ImageCodecPreDecompress cres=0x%X\n",cres);
+    printf("ImageCodecPreDecompress cres=0x%lX\n",cres);
 
 //    decpar.conditionFlags=0x10FFF; // first
 //    decpar.preferredOffscreenPixelSize=17207;
@@ -343,7 +347,7 @@
     if(decpar.frameNumber==124){
 	decpar.frameNumber=1;
 	cres=ImageCodecPreDecompress(ci,&decpar);
-	printf("ImageCodecPreDecompress cres=0x%X\n",cres);
+	printf("ImageCodecPreDecompress cres=0x%lX\n",cres);
     }
 #endif
 
@@ -352,7 +356,7 @@
     ++decpar.frameNumber;
 
     if(cres&0xFFFF){
-	printf("ImageCodecBandDecompress cres=0x%X (-0x%X) %d\n",cres,-cres,cres);
+	printf("ImageCodecBandDecompress cres=0x%lX (-0x%lX) %ld\n",cres,-cres,cres);
 	return NULL;
     }
     
@@ -361,7 +365,7 @@
 
 if((int)sh->context==0x73797639){	// Sorenson 16-bit YUV -> std YVU9
 
-    short *src0=((char*)decpar.dstPixMap.baseAddr+0x20);
+    short *src0=(short *)((char*)decpar.dstPixMap.baseAddr+0x20);
 
     for(i=0;i<mpi->h;i++){
 	int x;
--- MPlayer-20021209/libmpcodecs/ad_qtaudio.c.warn	Mon Dec  9 22:53:09 2002
+++ MPlayer-20021209/libmpcodecs/ad_qtaudio.c	Tue Dec 10 00:19:21 2002
@@ -10,6 +10,10 @@
 #include "ad_internal.h"
 #include "bswap.h"
 
+#ifdef USE_WIN32DLL
+#include "ldt_keeper.h"
+#endif
+
 static ad_info_t info =  {
 	"QuickTime Audio Decoder",
 	"qtaudio",
--- MPlayer-20021209/libmpcodecs/vd_lcl.c.warn	Mon Sep  2 22:10:10 2002
+++ MPlayer-20021209/libmpcodecs/vd_lcl.c	Tue Dec 10 00:19:21 2002
@@ -491,7 +491,8 @@
         for (row = 0; row < height; row++) {
           pixel_ptr = row * width * 3;
           yq = encoded[pixel_ptr++];
-          uqvq = encoded[pixel_ptr++] + (encoded[pixel_ptr++] << 8);
+          uqvq = encoded[pixel_ptr+1] + (encoded[pixel_ptr+2] << 8);
+          pixel_ptr += 2;
           for (col = 1; col < width; col++) {
             encoded[pixel_ptr] = yq -= encoded[pixel_ptr];
             uqvq -= (encoded[pixel_ptr+1] | (encoded[pixel_ptr+2]<<8));
@@ -505,7 +506,8 @@
         for (row = 0; row < height; row++) {
           pixel_ptr = row * width * 3;
           yq = encoded[pixel_ptr++];
-          uqvq = encoded[pixel_ptr++] + (encoded[pixel_ptr++] << 8);
+          uqvq = encoded[pixel_ptr+1] + (encoded[pixel_ptr+2] << 8);
+          pixel_ptr += 2;
           for (col = 1; col < width; col++) {
             encoded[pixel_ptr] = yq -= encoded[pixel_ptr];
             uqvq -= (encoded[pixel_ptr+1] | (encoded[pixel_ptr+2]<<8));
--- MPlayer-20021209/libmpdemux/demux_mov.c.warn	Mon Dec  9 22:53:10 2002
+++ MPlayer-20021209/libmpdemux/demux_mov.c	Tue Dec 10 00:19:21 2002
@@ -1,5 +1,3 @@
-#define USE_QTX_CODECS
-
 //  QuickTime MOV file parser by A'rpi
 //  additional work by Atmos
 //  based on TOOLS/movinfo.c by A'rpi & Al3x
--- MPlayer-20021209/libmpdemux/dvdauth.c.warn	Sun Sep 22 15:14:56 2002
+++ MPlayer-20021209/libmpdemux/dvdauth.c	Tue Dec 10 00:19:21 2002
@@ -28,7 +28,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-//#include <string.h>      // FIXME: conflicts with fs.h
+#include <string.h>      // FIXME: conflicts with fs.h
 #include <errno.h>
 #include <unistd.h>
 #include <fcntl.h>
--- MPlayer-20021209/libmpdemux/demux_rawaudio.c.warn	Tue Nov 12 13:19:23 2002
+++ MPlayer-20021209/libmpdemux/demux_rawaudio.c	Tue Dec 10 00:19:21 2002
@@ -4,6 +4,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
+#include <string.h>
 
 #include "../cfgparser.h"
 
--- MPlayer-20021209/libvo/sub.c.warn	Mon Dec  9 22:53:10 2002
+++ MPlayer-20021209/libvo/sub.c	Tue Dec 10 00:19:21 2002
@@ -335,9 +335,10 @@
 		 if (sub_utf8){
 		    if ((c & 0xe0) == 0xc0)    /* 2 bytes U+00080..U+0007FF*/
 		       c = (c & 0x1f)<<6 | (t[++j] & 0x3f);
-		    else if((c & 0xf0) == 0xe0)/* 3 bytes U+00800..U+00FFFF*/
-		       c = ((c & 0x0f)<<6 |
-			    (t[++j] & 0x3f))<<6 | (t[++j] & 0x3f);
+		    else if((c & 0xf0) == 0xe0){/* 3 bytes U+00800..U+00FFFF*/
+		       c = ((c & 0x0f)<<6 | (t[++j] & 0x3f))<<6;
+		       c |= (t[++j] & 0x3f);
+		    }
 		 } else if (sub_unicode) 
 		       c = (c<<8) + t[++j]; 
 	      }
--- MPlayer-20021209/unrarlib.c.warn	Fri Sep 20 03:26:39 2002
+++ MPlayer-20021209/unrarlib.c	Tue Dec 10 00:19:21 2002
@@ -1676,7 +1676,10 @@
       UnpReadBuf(0);
     DecodeNumber((struct Decode *)&BD);
     if (Number<16)
-      Table[I++]=(Number+UnpOldTable[I]) & 0xf;
+    {
+      Table[I]=(Number+UnpOldTable[I]) & 0xf;
+      I++;
+    }
     else
       if (Number==16)
       {
--- MPlayer-20021209/mencoder.c.warn	Mon Dec  9 22:52:36 2002
+++ MPlayer-20021209/mencoder.c	Tue Dec 10 00:19:21 2002
@@ -1281,7 +1281,7 @@
         
         end_at_type = END_AT_SIZE;
 
-        if(sscanf(param, "%d%3s", &end_at, unit) == 2) {
+        if(sscanf(param, "%lf%3s", &end_at, unit) == 2) {
             if(!strcasecmp(unit, "b"))
                 ;
             else if(!strcasecmp(unit, "kb"))
--- MPlayer-20021209/subreader.h.warn	Mon Dec  9 22:52:36 2002
+++ MPlayer-20021209/subreader.h	Tue Dec 10 00:19:21 2002
@@ -43,6 +43,8 @@
 void dump_srt(subtitle* subs, float fps);
 void dump_mpsub(subtitle* subs, float fps);
 void dump_microdvd(subtitle* subs, float fps);
+void dump_jacosub(subtitle* subs, float fps);
+void dump_sami(subtitle* subs, float fps);
 void sub_free( subtitle * subs );
 void find_sub(subtitle* subtitles,int key);
 void step_sub(subtitle *subtitles, float pts, int movement);


More information about the MPlayer-dev-eng mailing list