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 9f060de5f20..ed2ecc2558a 100644 --- a/dlls/mfplat/buffer.c +++ b/dlls/mfplat/buffer.c @@ -313,6 +313,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 8367d6a2646..f5608ad7883 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -5757,7 +5757,6 @@ static void test_MFCreate2DMediaBuffer(void) ok(hr == S_OK, "Failed to lock buffer, hr %#x.\n", hr);
for (i = 0; i < 8; i++) - todo_wine ok(data[i] == 0xbb, "Invalid data 0x%02x at position %u instead of 0xbb.\n", data[i], i);
hr = IMFMediaBuffer_Unlock(buffer);