1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

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

This commit is contained in:
mbarann
2015-11-12 13:13:45 +01:00
parent b4112a5878
commit b48b2d43b0
+2 -2
View File
@@ -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.
);