Commit f4e201ad authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

qcap: Fix strf chunk size in AviMuxIn_ReceiveConnection.

parent dddc278b
......@@ -1809,9 +1809,9 @@ static HRESULT WINAPI AviMuxIn_ReceiveConnection(IPin *iface,
}
size = pmt->cbFormat - FIELD_OFFSET(VIDEOINFOHEADER, bmiHeader);
avimuxin->strf = CoTaskMemAlloc(sizeof(RIFFCHUNK) + ALIGN(FIELD_OFFSET(BITMAPINFO, bmiColors[iPALETTE_COLORS])));
avimuxin->strf = CoTaskMemAlloc(sizeof(RIFFCHUNK) + ALIGN(FIELD_OFFSET(BITMAPINFO, bmiColors[vih->bmiHeader.biClrUsed])));
avimuxin->strf->fcc = ckidSTREAMFORMAT;
avimuxin->strf->cb = FIELD_OFFSET(BITMAPINFO, bmiColors[iPALETTE_COLORS]);
avimuxin->strf->cb = FIELD_OFFSET(BITMAPINFO, bmiColors[vih->bmiHeader.biClrUsed]);
if(size > avimuxin->strf->cb)
size = avimuxin->strf->cb;
memcpy(avimuxin->strf->data, &vih->bmiHeader, size);
......
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