diff --git a/dlls/iccvid/iccvid.c b/dlls/iccvid/iccvid.c index 06915d12c88..ddb0d5b277a 100644 --- a/dlls/iccvid/iccvid.c +++ b/dlls/iccvid/iccvid.c @@ -961,7 +961,13 @@ LRESULT WINAPI ICCVID_DriverProc( DWORD_PTR dwDriverId, HDRVR hdrvr, UINT msg, return 0; case DRV_OPEN: + { + ICINFO *icinfo = (ICINFO *)lParam2; + TRACE("Opened\n"); + + if (icinfo && icinfo->fccType != ICTYPE_VIDEO) return 0; + info = ICCVID_Alloc( sizeof (ICCVID_Info), 1 ); if( info ) { @@ -969,6 +975,7 @@ LRESULT WINAPI ICCVID_DriverProc( DWORD_PTR dwDriverId, HDRVR hdrvr, UINT msg, info->cvinfo = NULL; } return (LRESULT) info; + } case ICM_GETINFO: return ICCVID_GetInfo( info, (ICINFO *)lParam1, (DWORD)lParam2 ); diff --git a/dlls/msrle32/msrle32.c b/dlls/msrle32/msrle32.c index 7a4deca3aa1..3fb6c625ffe 100644 --- a/dlls/msrle32/msrle32.c +++ b/dlls/msrle32/msrle32.c @@ -1099,6 +1099,8 @@ static CodecInfo* Open(LPICOPEN icinfo) return (LPVOID)0xFFFF0000; } + if (icinfo->fccType != ICTYPE_VIDEO) return NULL; + TRACE("(%p = {%lu,0x%08lX(%4.4s),0x%08lX(%4.4s),0x%lX,0x%lX,...})\n", icinfo, icinfo->dwSize, icinfo->fccType, (char*)&icinfo->fccType, icinfo->fccHandler, (char*)&icinfo->fccHandler, diff --git a/dlls/msvidc32/msvideo1.c b/dlls/msvidc32/msvideo1.c index 0a7913981e9..c639d208229 100644 --- a/dlls/msvidc32/msvideo1.c +++ b/dlls/msvidc32/msvideo1.c @@ -497,7 +497,13 @@ LRESULT WINAPI CRAM_DriverProc( DWORD_PTR dwDriverId, HDRVR hdrvr, UINT msg, break; case DRV_OPEN: + { + ICINFO *icinfo = (ICINFO *)lParam2; + TRACE("Opened\n"); + + if (icinfo && icinfo->fccType != ICTYPE_VIDEO) return 0; + info = HeapAlloc( GetProcessHeap(), 0, sizeof (Msvideo1Context) ); if( info ) { @@ -506,6 +512,7 @@ LRESULT WINAPI CRAM_DriverProc( DWORD_PTR dwDriverId, HDRVR hdrvr, UINT msg, } r = (LRESULT) info; break; + } case ICM_GETINFO: r = CRAM_GetInfo( info, (ICINFO *)lParam1, (DWORD)lParam2 ); diff --git a/dlls/msvideo/msvideo_main.c b/dlls/msvideo/msvideo_main.c index 30592435af2..04792106d0f 100644 --- a/dlls/msvideo/msvideo_main.c +++ b/dlls/msvideo/msvideo_main.c @@ -400,7 +400,7 @@ HIC MSVIDEO_OpenFunction(DWORD fccType, DWORD fccHandler, UINT wMode, icopen.dwSize = sizeof(ICOPEN); icopen.fccType = fccType; icopen.fccHandler = fccHandler; - icopen.dwVersion = 0x00001000; /* FIXME */ + icopen.dwVersion = ICVERSION; icopen.dwFlags = wMode; icopen.dwError = 0; icopen.pV1Reserved = NULL;