Commit b48b2d43 authored by mbarann's avatar mbarann

MSMF expects a bottom-up video frame, so the buffer pointer must point to the…

MSMF expects a bottom-up video frame, so the buffer pointer must point to the end of the data and the stride needs to be negative
parent b4112a58
......@@ -4372,8 +4372,8 @@ HRESULT CvVideoWriter_MSMF::WriteFrame(DWORD *videoFrameBuffer, const LONGLONG&
hr = MFCopyImage(
pData, // Destination buffer.
cbWidth, // Destination stride.
(BYTE*)videoFrameBuffer, // First row in source image.
cbWidth, // Source stride.
((BYTE*)videoFrameBuffer) + (videoHeight-1)*cbWidth, // First row in source image.
-cbWidth, // Source stride.
cbWidth, // Image width in bytes.
videoHeight // Image height in pixels.
);
......
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