Nikolay Sivov (@nsivov) commented about dlls/mfmediaengine/main.c:
- if (current_length < frame_width * frame_height * format_size)
- {
WARN("Unexpected source length %lu.\n", current_length);
hr = MF_E_UNEXPECTED;
goto done_unlock_dst;
- }
- src_stride = frame_width * format_size;
- buffer += src_rect.top * src_stride + src_rect.left * format_size;
- for (y = 0; y < wic_rect.Height; ++y)
- {
memcpy(data, buffer, dst_stride);
buffer += src_stride;
data += dst_stride;
- }
This could be replaced with MFCopyImage().