Commit 135bdc21 authored by Giovanni Mascellani's avatar Giovanni Mascellani Committed by Alexandre Julliard

mfplat: Fix buffer reading with IMF2DBuffer::Lock().

parent 8adb6d80
......@@ -311,6 +311,10 @@ static HRESULT WINAPI memory_1d_2d_buffer_Lock(IMFMediaBuffer *iface, BYTE **dat
{
if (!(buffer->_2d.linear_buffer = malloc(ALIGN_SIZE(buffer->_2d.plane_size, MF_64_BYTE_ALIGNMENT))))
hr = E_OUTOFMEMORY;
if (SUCCEEDED(hr))
copy_image(buffer, buffer->_2d.linear_buffer, buffer->_2d.width, buffer->data, buffer->_2d.pitch,
buffer->_2d.width, buffer->_2d.height);
}
if (SUCCEEDED(hr))
......
......@@ -5872,7 +5872,6 @@ static void test_MFCreate2DMediaBuffer(void)
hr = IMFMediaBuffer_Lock(buffer, &data, NULL, NULL);
ok(hr == S_OK, "Failed to lock buffer, hr %#lx.\n", hr);
todo_wine
ok(memcmp(data, eight_bbs, sizeof(eight_bbs)) == 0, "Invalid data instead of 0xbb.\n");
hr = IMFMediaBuffer_Unlock(buffer);
......
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