Signed-off-by: Giovanni Mascellani gmascellani@codeweavers.com --- dlls/mfplat/buffer.c | 4 ++++ dlls/mfplat/tests/mfplat.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/mfplat/buffer.c b/dlls/mfplat/buffer.c index 2ec714c1419..133af2af470 100644 --- a/dlls/mfplat/buffer.c +++ b/dlls/mfplat/buffer.c @@ -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)) diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index 7e72abbde22..16d24bbff51 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -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);