qcap: Fix strf chunk size in AviMuxIn_ReceiveConnection.

This commit is contained in:
Piotr Caban 2014-02-26 13:36:58 +01:00 committed by Alexandre Julliard
parent dddc278b4d
commit f4e201ad46

View File

@ -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);