[MPlayer-cvslog] r38673 - in trunk: libmpcodecs/vd_qtvideo.c libvo/vo_kva.c loader/afl.c loader/dshow/DS_Filter.c loader/dshow/DS_VideoDecoder.c loader/dshow/graph.c loader/ext.c loader/module.c loader/win32.c
komh
subversion at mplayerhq.hu
Wed Jan 8 16:47:42 EET 2025
Author: komh
Date: Wed Jan 8 16:47:42 2025
New Revision: 38673
Log:
Try to adapt to recent compilers such as GCC 14
Recent compilers such as GCC 14 generate errors for implicit casts.
Modified:
trunk/libmpcodecs/vd_qtvideo.c
trunk/libvo/vo_kva.c
trunk/loader/afl.c
trunk/loader/dshow/DS_Filter.c
trunk/loader/dshow/DS_VideoDecoder.c
trunk/loader/dshow/graph.c
trunk/loader/ext.c
trunk/loader/module.c
trunk/loader/win32.c
Modified: trunk/libmpcodecs/vd_qtvideo.c
==============================================================================
--- trunk/libmpcodecs/vd_qtvideo.c Wed Jan 8 16:09:39 2025 (r38672)
+++ trunk/libmpcodecs/vd_qtvideo.c Wed Jan 8 16:47:42 2025 (r38673)
@@ -129,7 +129,7 @@ static int init(sh_video_t *sh){
DecompressSequenceFrameS = (OSErr (*)(ImageSequence,Ptr,long,CodecFlags,CodecFlags*,ICMCompletionProcRecordPtr))GetProcAddress(handler, "DecompressSequenceFrameS");
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");
+ NewHandleClear = (Handle(*)(Size))GetProcAddress(handler, "NewHandleClear");
DisposeHandle = (void (*)(Handle))GetProcAddress(handler, "DisposeHandle");
DisposeGWorld = (void (*)(GWorldPtr))GetProcAddress(handler, "DisposeGWorld");
CDSequenceEnd = (OSErr (*)(ImageSequence))GetProcAddress(handler, "CDSequenceEnd");
Modified: trunk/libvo/vo_kva.c
==============================================================================
--- trunk/libvo/vo_kva.c Wed Jan 8 16:09:39 2025 (r38672)
+++ trunk/libvo/vo_kva.c Wed Jan 8 16:47:42 2025 (r38673)
@@ -319,8 +319,8 @@ static void imgDisplay(void)
dstStride[2], m_int.stride[2]);
}
} else {
- sws_scale(m_int.sws, m_int.planes, m_int.stride, 0, SRC_HEIGHT,
- dst, dstStride);
+ sws_scale(m_int.sws, (const uint8_t * const *)m_int.planes,
+ m_int.stride, 0, SRC_HEIGHT, dst, dstStride);
}
kvaUnlockBuffer();
Modified: trunk/loader/afl.c
==============================================================================
--- trunk/loader/afl.c Wed Jan 8 16:09:39 2025 (r38672)
+++ trunk/loader/afl.c Wed Jan 8 16:47:42 2025 (r38673)
@@ -227,7 +227,7 @@ MMRESULT WINAPI acmDriverOpen(PHACMDRIVE
return MMSYSERR_ERROR;
}
- pad->pfnDriverProc = GetProcAddress(pad->hDrvr, "DriverProc");
+ pad->pfnDriverProc = (DRIVERPROC)GetProcAddress(pad->hDrvr, "DriverProc");
/* insert new pad at beg of list */
pad->pNextACMDriver = padid->pACMDriverList;
Modified: trunk/loader/dshow/DS_Filter.c
==============================================================================
--- trunk/loader/dshow/DS_Filter.c Wed Jan 8 16:09:39 2025 (r38672)
+++ trunk/loader/dshow/DS_Filter.c Wed Jan 8 16:47:42 2025 (r38673)
@@ -216,7 +216,7 @@ DS_Filter* DS_FilterCreate(const char* d
enum_pins->vt->Reset(enum_pins);
result = enum_pins->vt->Next(enum_pins, (ULONG)256, (IPin**)array, &fetched);
- enum_pins->vt->Release(enum_pins);
+ enum_pins->vt->Release((IUnknown *)enum_pins);
Debug printf("Pins enumeration returned %ld pins, error is %x\n", fetched, (int)result);
for (i = 0; i < fetched; i++)
@@ -306,7 +306,7 @@ DS_Filter* DS_FilterCreate(const char* d
init++;
break;
}
- tempAll->vt->Release(tempAll);
+ tempAll->vt->Release((IUnknown *)tempAll);
if (!init)
{
Modified: trunk/loader/dshow/DS_VideoDecoder.c
==============================================================================
--- trunk/loader/dshow/DS_VideoDecoder.c Wed Jan 8 16:09:39 2025 (r38672)
+++ trunk/loader/dshow/DS_VideoDecoder.c Wed Jan 8 16:47:42 2025 (r38673)
@@ -601,8 +601,8 @@ int DS_VideoDecoder_SetDestFmt(DS_VideoD
}
if(this->m_pDS_Filter->m_pAll)
- this->m_pDS_Filter->m_pAll->vt->Release(this->m_pDS_Filter->m_pAll);
- this->m_pDS_Filter->m_pAll=MemAllocatorCreate();
+ this->m_pDS_Filter->m_pAll->vt->Release((IUnknown *)this->m_pDS_Filter->m_pAll);
+ this->m_pDS_Filter->m_pAll=(IMemAllocator *)MemAllocatorCreate();
if (!this->m_pDS_Filter->m_pAll)
{
printf("Call to MemAllocatorCreate failed\n");
Modified: trunk/loader/dshow/graph.c
==============================================================================
--- trunk/loader/dshow/graph.c Wed Jan 8 16:09:39 2025 (r38672)
+++ trunk/loader/dshow/graph.c Wed Jan 8 16:47:42 2025 (r38673)
@@ -141,14 +141,14 @@ FilterGraph* FilterGraphCreate()
This->vt->AddRef = FilterGraph_AddRef;
This->vt->Release = FilterGraph_Release;
- This->vt->AddFilter = FilterGraph_AddFilter;
- This->vt->RemoveFilter = FilterGraph_RemoveFilter;
- This->vt->EnumFilters = FilterGraph_EnumFilters;
- This->vt->FindFilterByName = FilterGraph_FindFilterByName;
- This->vt->ConnectDirect = FilterGraph_ConnectDirect;
- This->vt->Reconnect = FilterGraph_Reconnect;
- This->vt->Disconnect = FilterGraph_Disconnect;
- This->vt->SetDefaultSyncSource = FilterGraph_SetDefaultSyncSource;
+ This->vt->AddFilter = (void *)FilterGraph_AddFilter;
+ This->vt->RemoveFilter = (void *)FilterGraph_RemoveFilter;
+ This->vt->EnumFilters = (void *)FilterGraph_EnumFilters;
+ This->vt->FindFilterByName = (void *)FilterGraph_FindFilterByName;
+ This->vt->ConnectDirect = (void *)FilterGraph_ConnectDirect;
+ This->vt->Reconnect = (void *)FilterGraph_Reconnect;
+ This->vt->Disconnect = (void *)FilterGraph_Disconnect;
+ This->vt->SetDefaultSyncSource = (void *)FilterGraph_SetDefaultSyncSource;
This->interfaces[0] = IID_IUnknown;
This->interfaces[1] = IID_IFilterGraph;
Modified: trunk/loader/ext.c
==============================================================================
--- trunk/loader/ext.c Wed Jan 8 16:09:39 2025 (r38672)
+++ trunk/loader/ext.c Wed Jan 8 16:47:42 2025 (r38673)
@@ -444,7 +444,7 @@ LPVOID WINAPI VirtualAlloc(LPVOID addres
if (type&MEM_RESERVE && (unsigned)address&0xffff) {
size += (unsigned)address&0xffff;
- address = (unsigned)address&~0xffff;
+ address = (LPVOID)((unsigned)address&~0xffff);
}
pgsz = sysconf(_SC_PAGESIZE);
if (type&MEM_COMMIT && (unsigned)address%pgsz) {
Modified: trunk/loader/module.c
==============================================================================
--- trunk/loader/module.c Wed Jan 8 16:09:39 2025 (r38672)
+++ trunk/loader/module.c Wed Jan 8 16:47:42 2025 (r38673)
@@ -844,7 +844,7 @@ static int report_func(void *stack_base,
// memory management:
case 0x150011: //NewPtrClear
case 0x150012: //NewPtrSysClear
- reg->eax = malloc(((uint32_t *)stack_base)[1]);
+ reg->eax = (uintptr_t)malloc(((uint32_t *)stack_base)[1]);
memset((void *)reg->eax,0,((uint32_t *)stack_base)[1]);
#ifdef DEBUG_QTX_API
printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax);
@@ -852,7 +852,7 @@ static int report_func(void *stack_base,
return 1;
case 0x15000F: //NewPtr
case 0x150010: //NewPtrSys
- reg->eax = malloc(((uint32_t *)stack_base)[1]);
+ reg->eax = (uintptr_t)malloc(((uint32_t *)stack_base)[1]);
#ifdef DEBUG_QTX_API
printf("%*sLEAVE(%d): EMULATED! 0x%X\n",ret_i*2,"",ret_i, reg->eax);
#endif
Modified: trunk/loader/win32.c
==============================================================================
--- trunk/loader/win32.c Wed Jan 8 16:09:39 2025 (r38672)
+++ trunk/loader/win32.c Wed Jan 8 16:47:42 2025 (r38673)
@@ -603,7 +603,7 @@ static HMODULE WINAPI expGetModuleHandle
int pos = 0;
while (*name) {
if (*name > 256 || pos >= sizeof(aname) - 1)
- return NULL;
+ return (HMODULE)NULL;
aname[pos++] = *name++;
}
aname[pos] = 0;
@@ -1504,7 +1504,7 @@ static void WINAPI expDeleteCriticalSect
static int WINAPI expGetCurrentThreadId(void)
{
dbgprintf("GetCurrentThreadId() => %d\n", pthread_self());
- return pthread_self();
+ return (int)pthread_self();
}
static int WINAPI expGetCurrentProcess(void)
{
@@ -2019,15 +2019,16 @@ static DWORD WINAPI expSignalObjectAndWa
expSetEvent(mlist);
break;
case 1: // Semaphore
- expReleaseSemaphore(mlist, 1, NULL);
+ expReleaseSemaphore((intptr_t)mlist, 1, NULL);
break;
case 2: // Mutex
- expReleaseMutex(mlist);
+ expReleaseMutex((HANDLE)mlist);
break;
default:
dbgprintf("Signalling unknown object type %d!\n", hObjectToSignal);
}
- return expWaitForSingleObject(hObjectToWaitOn, dwMilliseconds);
+ return (DWORD)expWaitForSingleObject((void *)hObjectToWaitOn,
+ dwMilliseconds);
}
static long WINAPI expRegOpenKeyExA(long key, const char* subkey, long reserved, long access, int* newkey)
@@ -2751,7 +2752,7 @@ static int WINAPI expEnumDisplayMonitors
{
dbgprintf("EnumDisplayMonitors(0x%x, 0x%x, 0x%x, 0x%x) => ?\n",
dc, r, callback_proc, callback_param);
- return callback_proc(0, dc, r, callback_param);
+ return callback_proc(0, (HDC)dc, r, (LPARAM)callback_param);
}
#if 0
@@ -2851,14 +2852,14 @@ static int WINAPI expEnumWindows(int (*c
{
int i, i2;
dbgprintf("EnumWindows(0x%x, 0x%x) => 1\n", callback_func, callback_param);
- i = callback_func(0, callback_param);
- i2 = callback_func(1, callback_param);
+ i = callback_func(0, (LPARAM)callback_param);
+ i2 = callback_func(1, (LPARAM)callback_param);
return i && i2;
}
static int WINAPI expGetWindowThreadProcessId(HWND win, int *pid_data)
{
- int tid = pthread_self();
+ int tid = (int)pthread_self();
dbgprintf("GetWindowThreadProcessId(0x%x, 0x%x) => %d\n",
win, pid_data, tid);
if (pid_data)
@@ -4940,7 +4941,7 @@ static HPALETTE WINAPI expCreatePalette(
dbgprintf("CreatePalette(%x) => NULL\n", lpgpl);
i = sizeof(LOGPALETTE)+((lpgpl->palNumEntries-1)*sizeof(PALETTEENTRY));
- test = malloc(i);
+ test = (HPALETTE)malloc(i);
memcpy((void *)test, lpgpl, i);
return test;
More information about the MPlayer-cvslog
mailing list