[MSVFW32] Sync with Wine Staging 1.7.55. CORE-10536

svn path=/trunk/; revision=69988
This commit is contained in:
Amine Khaldi 2015-11-21 10:03:40 +00:00
parent 6f68f8bd50
commit 21d2997f07
4 changed files with 259 additions and 124 deletions

View file

@ -303,7 +303,8 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc,
UINT wFlags) UINT wFlags)
{ {
WINE_HDD *whdd; WINE_HDD *whdd;
BOOL ret = TRUE; BOOL ret;
int reopen = 0;
TRACE("(%p,%p,%d,%d,%d,%d,%p,%p,%d,%d,%d,%d,0x%08x)\n", TRACE("(%p,%p,%d,%d,%d,%d,%p,%p,%d,%d,%d,%d,0x%08x)\n",
hdd, hdc, xDst, yDst, dxDst, dyDst, lpbi, lpBits, xSrc, ySrc, dxSrc, dySrc, wFlags); hdd, hdc, xDst, yDst, dxDst, dyDst, lpbi, lpBits, xSrc, ySrc, dxSrc, dySrc, wFlags);
@ -325,11 +326,25 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc,
#define CHANGED(x) (whdd->x != x) #define CHANGED(x) (whdd->x != x)
if ((!whdd->begun) || /* Check if anything changed from the parameters passed and our struct.
(!(wFlags & DDF_SAME_HDC) && CHANGED(hdc)) || * If anything changed we need to run DrawDibBegin again to ensure we
(!(wFlags & DDF_SAME_DRAW) && (CHANGED(lpbi) || CHANGED(dxSrc) || CHANGED(dySrc) || CHANGED(dxDst) || CHANGED(dyDst)))) * can support the changes.
*/
if (!whdd->begun)
reopen = 1;
else if (!(wFlags & DDF_SAME_HDC) && CHANGED(hdc))
reopen = 2;
else if (!(wFlags & DDF_SAME_DRAW))
{ {
TRACE("Something changed!\n"); if (CHANGED(lpbi) && memcmp(lpbi, whdd->lpbi, sizeof(*lpbi))) reopen = 3;
else if (CHANGED(dxSrc)) reopen = 4;
else if (CHANGED(dySrc)) reopen = 5;
else if (CHANGED(dxDst)) reopen = 6;
else if (CHANGED(dyDst)) reopen = 7;
}
if (reopen)
{
TRACE("Something changed (reason %d)!\n", reopen);
ret = DrawDibBegin(hdd, hdc, dxDst, dyDst, lpbi, dxSrc, dySrc, 0); ret = DrawDibBegin(hdd, hdc, dxDst, dyDst, lpbi, dxSrc, dySrc, 0);
if (!ret) if (!ret)
return ret; return ret;
@ -337,7 +352,14 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc,
#undef CHANGED #undef CHANGED
if ((dxDst == -1) && (dyDst == -1)) /* If source dimensions are not specified derive them from bitmap header */
if (dxSrc == -1 && dySrc == -1)
{
dxSrc = lpbi->biWidth;
dySrc = lpbi->biHeight;
}
/* If destination dimensions are not specified derive them from source */
if (dxDst == -1 && dyDst == -1)
{ {
dxDst = dxSrc; dxDst = dxSrc;
dyDst = dySrc; dyDst = dySrc;
@ -371,8 +393,9 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc,
SelectPalette(hdc, whdd->hpal, FALSE); SelectPalette(hdc, whdd->hpal, FALSE);
} }
if (!(StretchBlt(whdd->hdc, xDst, yDst, dxDst, dyDst, whdd->hMemDC, xSrc, ySrc, dxSrc, dySrc, SRCCOPY))) ret = StretchBlt(whdd->hdc, xDst, yDst, dxDst, dyDst, whdd->hMemDC, xSrc, ySrc, dxSrc, dySrc, SRCCOPY);
ret = FALSE; TRACE("Painting %dx%d at %d,%d from %dx%d at %d,%d -> %d\n",
dxDst, dyDst, xDst, yDst, dxSrc, dySrc, xSrc, ySrc, ret);
return ret; return ret;
} }

View file

@ -1063,27 +1063,33 @@ end_of_mci_open:
case MCIWNDM_GETDEVICEA: case MCIWNDM_GETDEVICEA:
{ {
int len = 0;
char *str = (char *)lParam;
MCI_SYSINFO_PARMSA mci_sysinfo; MCI_SYSINFO_PARMSA mci_sysinfo;
mci_sysinfo.lpstrReturn = (LPSTR)lParam; mci_sysinfo.lpstrReturn = str;
mci_sysinfo.dwRetSize = wParam; mci_sysinfo.dwRetSize = wParam;
mwi->lasterror = mciSendCommandA(mwi->mci, MCI_SYSINFO, mwi->lasterror = mciSendCommandA(mwi->mci, MCI_SYSINFO,
MCI_SYSINFO_INSTALLNAME, MCI_SYSINFO_INSTALLNAME,
(DWORD_PTR)&mci_sysinfo); (DWORD_PTR)&mci_sysinfo);
TRACE("MCIWNDM_GETDEVICEA: %s\n", debugstr_an((LPSTR)lParam, wParam)); while(len < wParam && str[len]) len++;
TRACE("MCIWNDM_GETDEVICEA: %s\n", debugstr_an(str, len));
return 0; return 0;
} }
case MCIWNDM_GETDEVICEW: case MCIWNDM_GETDEVICEW:
{ {
int len = 0;
WCHAR *str = (WCHAR *)lParam;
MCI_SYSINFO_PARMSW mci_sysinfo; MCI_SYSINFO_PARMSW mci_sysinfo;
mci_sysinfo.lpstrReturn = (LPWSTR)lParam; mci_sysinfo.lpstrReturn = str;
mci_sysinfo.dwRetSize = wParam; mci_sysinfo.dwRetSize = wParam;
mwi->lasterror = mciSendCommandW(mwi->mci, MCI_SYSINFO, mwi->lasterror = mciSendCommandW(mwi->mci, MCI_SYSINFO,
MCI_SYSINFO_INSTALLNAME, MCI_SYSINFO_INSTALLNAME,
(DWORD_PTR)&mci_sysinfo); (DWORD_PTR)&mci_sysinfo);
TRACE("MCIWNDM_GETDEVICEW: %s\n", debugstr_wn((LPWSTR)lParam, wParam)); while(len < wParam && str[len]) len++;
TRACE("MCIWNDM_GETDEVICEW: %s\n", debugstr_wn(str, len));
return 0; return 0;
} }

View file

@ -38,11 +38,56 @@
WINE_DEFAULT_DEBUG_CHANNEL(msvideo); WINE_DEFAULT_DEBUG_CHANNEL(msvideo);
/* This one is a macro in order to work for both ASCII and Unicode */
#define fourcc_to_string(str, fcc) do { \
(str)[0] = LOBYTE(LOWORD(fcc)); \
(str)[1] = HIBYTE(LOWORD(fcc)); \
(str)[2] = LOBYTE(HIWORD(fcc)); \
(str)[3] = HIBYTE(HIWORD(fcc)); \
} while(0)
static inline const char *wine_dbgstr_fcc( DWORD fcc ) static inline const char *wine_dbgstr_fcc( DWORD fcc )
{ {
return wine_dbg_sprintf("%c%c%c%c", char fcc_str[5];
LOBYTE(LOWORD(fcc)), HIBYTE(LOWORD(fcc)), fourcc_to_string(fcc_str, fcc);
LOBYTE(HIWORD(fcc)), HIBYTE(HIWORD(fcc))); fcc_str[4] = '\0';
/* Last byte may be ' ' in some cases like "DIB " */
if (isalnum(fcc_str[0]) && isalnum(fcc_str[1]) && isalnum(fcc_str[2])
&& (isalnum(fcc_str[3]) || isspace(fcc_str[3])))
return wine_dbg_sprintf("%s", fcc_str);
return wine_dbg_sprintf("0x%08x", fcc);
}
static const char *wine_dbgstr_icerr( int ret )
{
const char *str;
if (ret <= ICERR_CUSTOM)
return wine_dbg_sprintf("ICERR_CUSTOM (%d)", ret);
#define XX(x) case (x): str = #x; break
switch (ret)
{
XX(ICERR_OK);
XX(ICERR_DONTDRAW);
XX(ICERR_NEWPALETTE);
XX(ICERR_GOTOKEYFRAME);
XX(ICERR_STOPDRAWING);
XX(ICERR_UNSUPPORTED);
XX(ICERR_BADFORMAT);
XX(ICERR_MEMORY);
XX(ICERR_INTERNAL);
XX(ICERR_BADFLAGS);
XX(ICERR_BADPARAM);
XX(ICERR_BADSIZE);
XX(ICERR_BADHANDLE);
XX(ICERR_CANTUPDATE);
XX(ICERR_ABORT);
XX(ICERR_ERROR);
XX(ICERR_BADBITDEPTH);
XX(ICERR_BADIMAGESIZE);
default: str = wine_dbg_sprintf("UNKNOWN (%d)", ret);
}
#undef XX
return str;
} }
static WINE_HIC* MSVIDEO_FirstHic /* = NULL */; static WINE_HIC* MSVIDEO_FirstHic /* = NULL */;
@ -59,14 +104,6 @@ struct _reg_driver
static reg_driver* reg_driver_list = NULL; static reg_driver* reg_driver_list = NULL;
/* This one is a macro in order to work for both ASCII and Unicode */
#define fourcc_to_string(str, fcc) do { \
(str)[0] = LOBYTE(LOWORD(fcc)); \
(str)[1] = HIBYTE(LOWORD(fcc)); \
(str)[2] = LOBYTE(HIWORD(fcc)); \
(str)[3] = HIBYTE(HIWORD(fcc)); \
} while(0)
HMODULE MSVFW32_hModule; HMODULE MSVFW32_hModule;
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
@ -165,7 +202,7 @@ static LRESULT MSVIDEO_SendMessage(WINE_HIC* whic, UINT msg, DWORD_PTR lParam1,
ret = SendDriverMessage(whic->hdrv, msg, lParam1, lParam2); ret = SendDriverMessage(whic->hdrv, msg, lParam1, lParam2);
} }
TRACE(" -> 0x%08lx\n", ret); TRACE(" -> %s\n", wine_dbgstr_icerr(ret));
return ret; return ret;
} }
@ -282,8 +319,8 @@ static BOOL ICInfo_enum_handler(const char *drv, unsigned int nr, void *param)
*/ */
BOOL VFWAPI ICInfo( DWORD fccType, DWORD fccHandler, ICINFO *lpicinfo) BOOL VFWAPI ICInfo( DWORD fccType, DWORD fccHandler, ICINFO *lpicinfo)
{ {
TRACE("(%s,%s/%08x,%p)\n", TRACE("(%s,%s,%p)\n",
wine_dbgstr_fcc(fccType), wine_dbgstr_fcc(fccHandler), fccHandler, lpicinfo); wine_dbgstr_fcc(fccType), wine_dbgstr_fcc(fccHandler), lpicinfo);
lpicinfo->fccType = fccType; lpicinfo->fccType = fccType;
lpicinfo->fccHandler = fccHandler; lpicinfo->fccHandler = fccHandler;
@ -391,6 +428,27 @@ HIC VFWAPI ICOpen(DWORD fccType, DWORD fccHandler, UINT wMode)
TRACE("(%s,%s,0x%08x)\n", wine_dbgstr_fcc(fccType), wine_dbgstr_fcc(fccHandler), wMode); TRACE("(%s,%s,0x%08x)\n", wine_dbgstr_fcc(fccType), wine_dbgstr_fcc(fccHandler), wMode);
if (!fccHandler) /* No specific handler, return the first valid for wMode */
{
HIC local;
ICINFO info;
DWORD loop = 0;
info.dwSize = sizeof(info);
while(ICInfo(fccType, loop++, &info))
{
/* Ensure fccHandler is not 0x0 because we will recurse on ICOpen */
if(!info.fccHandler)
continue;
local = ICOpen(fccType, info.fccHandler, wMode);
if (local != 0)
{
TRACE("Returning %s as defult handler for %s\n",
wine_dbgstr_fcc(info.fccHandler), wine_dbgstr_fcc(fccType));
return local;
}
}
}
/* Check if there is a registered driver that matches */ /* Check if there is a registered driver that matches */
driver = reg_driver_list; driver = reg_driver_list;
while(driver) while(driver)
@ -556,7 +614,7 @@ LRESULT VFWAPI ICGetInfo(HIC hic, ICINFO *picinfo, DWORD cb)
lstrcpyW(picinfo->szDriver, ii.szDriver); lstrcpyW(picinfo->szDriver, ii.szDriver);
} }
TRACE(" -> 0x%08lx\n", ret); TRACE(" -> %s\n", wine_dbgstr_icerr(ret));
return ret; return ret;
} }
@ -641,8 +699,8 @@ HIC VFWAPI ICLocate(DWORD fccType, DWORD fccHandler, LPBITMAPINFOHEADER lpbiIn,
if (fccType == streamtypeVIDEO) if (fccType == streamtypeVIDEO)
return ICLocate(ICTYPE_VIDEO, fccHandler, lpbiIn, lpbiOut, wMode); return ICLocate(ICTYPE_VIDEO, fccHandler, lpbiIn, lpbiOut, wMode);
WARN("(%s,%s,%p,%p,0x%04x) not found!\n", ERR("Required media codec '%s %s' not found!\n",
wine_dbgstr_fcc(fccType), wine_dbgstr_fcc(fccHandler), lpbiIn, lpbiOut, wMode); wine_dbgstr_fcc(fccType), wine_dbgstr_fcc(fccHandler));
return 0; return 0;
} }
@ -753,7 +811,7 @@ DWORD VFWAPIV ICDecompress(HIC hic,DWORD dwFlags,LPBITMAPINFOHEADER lpbiFormat,
icd.ckid = 0; icd.ckid = 0;
ret = ICSendMessage(hic,ICM_DECOMPRESS,(DWORD_PTR)&icd,sizeof(ICDECOMPRESS)); ret = ICSendMessage(hic,ICM_DECOMPRESS,(DWORD_PTR)&icd,sizeof(ICDECOMPRESS));
TRACE("-> %d\n",ret); TRACE("-> %s\n",wine_dbgstr_icerr(ret));
return ret; return ret;
} }
@ -1367,6 +1425,10 @@ LPVOID VFWAPI ICSeqCompressFrame(PCOMPVARS pc, UINT uiFlags, LPVOID lpBits, BOOL
icComp->lpPrev = pc->lpBitsPrev; icComp->lpPrev = pc->lpBitsPrev;
ret = ICSendMessage(pc->hic, ICM_COMPRESS, (DWORD_PTR)icComp, sizeof(*icComp)); ret = ICSendMessage(pc->hic, ICM_COMPRESS, (DWORD_PTR)icComp, sizeof(*icComp));
if (ret == ICERR_OK)
{
LPVOID oldprev, oldout;
if (icComp->dwFlags & AVIIF_KEYFRAME) if (icComp->dwFlags & AVIIF_KEYFRAME)
{ {
pc->lKeyCount = 1; pc->lKeyCount = 1;
@ -1377,36 +1439,42 @@ LPVOID VFWAPI ICSeqCompressFrame(PCOMPVARS pc, UINT uiFlags, LPVOID lpBits, BOOL
*pfKey = FALSE; *pfKey = FALSE;
*plSize = icComp->lpbiOutput->biSizeImage; *plSize = icComp->lpbiOutput->biSizeImage;
TRACE(" -- 0x%08x\n", ret);
if (ret == ICERR_OK) /* We shift Prev and Out, so we don't have to allocate and release memory */
{
LPVOID oldprev, oldout;
/* We shift Prev and Out, so we don't have to allocate and release memory */
oldprev = pc->lpBitsPrev; oldprev = pc->lpBitsPrev;
oldout = pc->lpBitsOut; oldout = pc->lpBitsOut;
pc->lpBitsPrev = oldout; pc->lpBitsPrev = oldout;
pc->lpBitsOut = oldprev; pc->lpBitsOut = oldprev;
TRACE("returning: %p\n", icComp->lpOutput); TRACE("returning: %p, compressed frame size %u\n", icComp->lpOutput, *plSize);
return icComp->lpOutput; return icComp->lpOutput;
} }
return NULL; return NULL;
} }
static void clear_compvars(PCOMPVARS pc)
{
HeapFree(GetProcessHeap(), 0, pc->lpbiIn);
HeapFree(GetProcessHeap(), 0, pc->lpBitsPrev);
HeapFree(GetProcessHeap(), 0, pc->lpBitsOut);
HeapFree(GetProcessHeap(), 0, pc->lpState);
pc->lpbiIn = pc->lpBitsPrev = pc->lpBitsOut = pc->lpState = NULL;
if (pc->dwFlags & 0x80000000)
{
HeapFree(GetProcessHeap(), 0, pc->lpbiOut);
pc->lpbiOut = NULL;
pc->dwFlags &= ~0x80000000;
}
}
/*********************************************************************** /***********************************************************************
* ICSeqCompressFrameEnd [MSVFW32.@] * ICSeqCompressFrameEnd [MSVFW32.@]
*/ */
void VFWAPI ICSeqCompressFrameEnd(PCOMPVARS pc) void VFWAPI ICSeqCompressFrameEnd(PCOMPVARS pc)
{ {
DWORD ret;
TRACE("(%p)\n", pc); TRACE("(%p)\n", pc);
ret = ICSendMessage(pc->hic, ICM_COMPRESS_END, 0, 0); ICSendMessage(pc->hic, ICM_COMPRESS_END, 0, 0);
TRACE(" -- %x\n", ret); clear_compvars(pc);
HeapFree(GetProcessHeap(), 0, pc->lpbiIn);
HeapFree(GetProcessHeap(), 0, pc->lpBitsPrev);
HeapFree(GetProcessHeap(), 0, pc->lpBitsOut);
HeapFree(GetProcessHeap(), 0, pc->lpState);
pc->lpbiIn = pc->lpBitsPrev = pc->lpBitsOut = pc->lpState = NULL;
} }
/*********************************************************************** /***********************************************************************
@ -1418,68 +1486,106 @@ BOOL VFWAPI ICSeqCompressFrameStart(PCOMPVARS pc, LPBITMAPINFO lpbiIn)
* it doesn't appear to be used though * it doesn't appear to be used though
*/ */
DWORD ret; DWORD ret;
ICCOMPRESS* icComp;
pc->lpbiIn = HeapAlloc(GetProcessHeap(), 0, sizeof(BITMAPINFO)); pc->lpbiIn = HeapAlloc(GetProcessHeap(), 0, sizeof(BITMAPINFO));
if (!pc->lpbiIn) if (!pc->lpbiIn)
return FALSE; return FALSE;
*pc->lpbiIn = *lpbiIn; *pc->lpbiIn = *lpbiIn;
pc->lpBitsPrev = HeapAlloc(GetProcessHeap(), 0, pc->lpbiIn->bmiHeader.biSizeImage);
if (!pc->lpBitsPrev)
{
HeapFree(GetProcessHeap(), 0, pc->lpbiIn);
return FALSE;
}
pc->lpState = HeapAlloc(GetProcessHeap(), 0, sizeof(ICCOMPRESS)); pc->lpState = HeapAlloc(GetProcessHeap(), 0, sizeof(ICCOMPRESS)
+ sizeof(*icComp->lpckid) + sizeof(*icComp->lpdwFlags));
if (!pc->lpState) if (!pc->lpState)
{ goto error;
HeapFree(GetProcessHeap(), 0, pc->lpbiIn);
HeapFree(GetProcessHeap(), 0, pc->lpBitsPrev);
return FALSE;
}
pc->cbState = sizeof(ICCOMPRESS); pc->cbState = sizeof(ICCOMPRESS);
pc->lpBitsOut = HeapAlloc(GetProcessHeap(), 0, pc->lpbiIn->bmiHeader.biSizeImage); if (!pc->lpbiOut)
if (!pc->lpBitsOut)
{ {
HeapFree(GetProcessHeap(), 0, pc->lpbiIn); /* Ask compressor for needed header size */
HeapFree(GetProcessHeap(), 0, pc->lpBitsPrev); int size = ICSendMessage(pc->hic, ICM_COMPRESS_GET_FORMAT,
HeapFree(GetProcessHeap(), 0, pc->lpState); (DWORD_PTR)pc->lpbiIn, 0);
return FALSE; if (size <= 0)
goto error;
pc->lpbiOut = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
if (!pc->lpbiOut)
goto error;
/* Flag to show that we allocated lpbiOut for proper cleanup */
pc->dwFlags |= 0x80000000;
ret = ICSendMessage(pc->hic, ICM_COMPRESS_GET_FORMAT,
(DWORD_PTR)pc->lpbiIn, (DWORD_PTR)pc->lpbiOut);
if (ret != ICERR_OK)
{
ERR("Could not get output format from compressor\n");
goto error;
} }
if (!pc->lpbiOut->bmiHeader.biSizeImage)
{
/* If we can't know the output frame size for sure at least allocate
* the same size of the input frame and also at least 8Kb to be sure
* that poor compressors will have enough memory to work if the input
* frame is too small.
*/
pc->lpbiOut->bmiHeader.biSizeImage = max(8192, pc->lpbiIn->bmiHeader.biSizeImage);
ERR("Bad codec! Invalid output frame size, guessing from input\n");
}
}
TRACE("Input: %ux%u, fcc %s, bpp %u, size %u\n",
pc->lpbiIn->bmiHeader.biWidth, pc->lpbiIn->bmiHeader.biHeight,
wine_dbgstr_fcc(pc->lpbiIn->bmiHeader.biCompression),
pc->lpbiIn->bmiHeader.biBitCount,
pc->lpbiIn->bmiHeader.biSizeImage);
TRACE("Output: %ux%u, fcc %s, bpp %u, size %u\n",
pc->lpbiOut->bmiHeader.biWidth, pc->lpbiOut->bmiHeader.biHeight,
wine_dbgstr_fcc(pc->lpbiOut->bmiHeader.biCompression),
pc->lpbiOut->bmiHeader.biBitCount,
pc->lpbiOut->bmiHeader.biSizeImage);
/* Buffer for compressed frame data */
pc->lpBitsOut = HeapAlloc(GetProcessHeap(), 0, pc->lpbiOut->bmiHeader.biSizeImage);
if (!pc->lpBitsOut)
goto error;
/* Buffer for previous compressed frame data */
pc->lpBitsPrev = HeapAlloc(GetProcessHeap(), 0, pc->lpbiOut->bmiHeader.biSizeImage);
if (!pc->lpBitsPrev)
goto error;
TRACE("Compvars:\n" TRACE("Compvars:\n"
"\tpc:\n"
"\tsize: %i\n" "\tsize: %i\n"
"\tflags: %i\n" "\tflags: 0x%x\n"
"\thic: %p\n" "\thic: %p\n"
"\ttype: %x\n" "\ttype: %s\n"
"\thandler: %x\n" "\thandler: %s\n"
"\tin/out: %p/%p\n" "\tin/out: %p/%p\n"
"key/data/quality: %i/%i/%i\n", "\tkey/data/quality: %i/%i/%i\n",
pc->cbSize, pc->dwFlags, pc->hic, pc->fccType, pc->fccHandler, pc->cbSize, pc->dwFlags, pc->hic, wine_dbgstr_fcc(pc->fccType),
pc->lpbiIn, pc->lpbiOut, pc->lKey, pc->lDataRate, pc->lQ); wine_dbgstr_fcc(pc->fccHandler), pc->lpbiIn, pc->lpbiOut, pc->lKey,
pc->lDataRate, pc->lQ);
ret = ICSendMessage(pc->hic, ICM_COMPRESS_BEGIN, (DWORD_PTR)pc->lpbiIn, (DWORD_PTR)pc->lpbiOut); ret = ICSendMessage(pc->hic, ICM_COMPRESS_BEGIN, (DWORD_PTR)pc->lpbiIn, (DWORD_PTR)pc->lpbiOut);
TRACE(" -- %x\n", ret);
if (ret == ICERR_OK) if (ret == ICERR_OK)
{ {
ICCOMPRESS* icComp = pc->lpState; icComp = pc->lpState;
/* Initialise some variables */ /* Initialise some variables */
pc->lFrame = 0; pc->lKeyCount = 0; pc->lFrame = 0; pc->lKeyCount = 0;
icComp->lpbiOutput = &pc->lpbiOut->bmiHeader; icComp->lpbiOutput = &pc->lpbiOut->bmiHeader;
icComp->lpbiInput = &pc->lpbiIn->bmiHeader; icComp->lpbiInput = &pc->lpbiIn->bmiHeader;
icComp->lpckid = NULL; icComp->lpckid = (DWORD *)(icComp + 1);
*icComp->lpckid = 0;
icComp->lpdwFlags = (DWORD *)((char *)(icComp + 1) + sizeof(*icComp->lpckid));
*icComp->lpdwFlags = 0;
icComp->dwFrameSize = 0; icComp->dwFrameSize = 0;
icComp->dwQuality = pc->lQ; icComp->dwQuality = pc->lQ;
icComp->lpbiPrev = &pc->lpbiIn->bmiHeader; icComp->lpbiPrev = &pc->lpbiIn->bmiHeader;
return TRUE; return TRUE;
} }
HeapFree(GetProcessHeap(), 0, pc->lpbiIn); error:
HeapFree(GetProcessHeap(), 0, pc->lpBitsPrev); clear_compvars(pc);
HeapFree(GetProcessHeap(), 0, pc->lpState);
HeapFree(GetProcessHeap(), 0, pc->lpBitsOut);
pc->lpBitsPrev = pc->lpbiIn = pc->lpState = pc->lpBitsOut = NULL;
return FALSE; return FALSE;
} }

View file

@ -128,7 +128,7 @@ reactos/dll/win32/mssip32 # Synced to WineStaging-1.7.47
reactos/dll/win32/mstask # Synced to WineStaging-1.7.47 reactos/dll/win32/mstask # Synced to WineStaging-1.7.47
reactos/dll/win32/msvcrt20 # Out of sync reactos/dll/win32/msvcrt20 # Out of sync
reactos/dll/win32/msvcrt40 # Out of sync reactos/dll/win32/msvcrt40 # Out of sync
reactos/dll/win32/msvfw32 # Synced to WineStaging-1.7.47 reactos/dll/win32/msvfw32 # Synced to WineStaging-1.7.55
reactos/dll/win32/msvidc32 # Synced to WineStaging-1.7.47 reactos/dll/win32/msvidc32 # Synced to WineStaging-1.7.47
reactos/dll/win32/msxml # Synced to WineStaging-1.7.47 reactos/dll/win32/msxml # Synced to WineStaging-1.7.47
reactos/dll/win32/msxml2 # Synced to WineStaging-1.7.47 reactos/dll/win32/msxml2 # Synced to WineStaging-1.7.47