Nikolay Sivov (@nsivov) commented about dlls/mfplat/buffer.c:
EnterCriticalSection(&buffer->cs);
- if (!buffer->_2d.linear_buffer && buffer->_2d.locks) + if (!buffer->_2d.linear_buffer && buffer->_2d.width == buffer->_2d.pitch) + { + BYTE *scanline; + LONG pitch; + + /* width and pitch are the same, so this avoids a potentially expensive copy */ + hr = memory_2d_buffer_lock(buffer, &scanline, &pitch, data, NULL); + } + else if (!buffer->_2d.linear_buffer && buffer->_2d.locks) + { hr = MF_E_INVALIDREQUEST; + }
Is it correct to swap those and ignore "!linear_buffer && locks" condition that was a failing path before? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8436#note_108034