Commit bd4ead0f authored by Bruno Jesus's avatar Bruno Jesus Committed by Alexandre Julliard

msvfw32: Ask the driver about how much data is required for lpbiOut.

parent f12a970c
......@@ -1458,7 +1458,13 @@ BOOL VFWAPI ICSeqCompressFrameStart(PCOMPVARS pc, LPBITMAPINFO lpbiIn)
if (!pc->lpbiOut)
{
pc->lpbiOut = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(BITMAPINFO));
/* Ask compressor for needed header size */
int size = ICSendMessage(pc->hic, ICM_COMPRESS_GET_FORMAT,
(DWORD_PTR)pc->lpbiIn, 0);
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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment