summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@theqtcompany.com>2015-03-12 14:52:52 +0100
committerYoann Lopes <yoann.lopes@theqtcompany.com>2015-03-18 10:54:19 +0000
commit2d8fcc15604a62037570d8c4729d74d200433f01 (patch)
treea976d32100af3e2e339d64592af2afa2bf8ba5cf
parent7420fb409a36780d966c4e7e2b79b098e339fb4c (diff)
WMF: fix RGB24 format matching.
MFVideoFormat_RGB24 has a BGR layout and should therefore be matched to QVideoFrame::Format_BGR24, not Format_RGB24. Task-number: QTBUG-42323 Change-Id: I1749b575b1738168e3d3c0d055dee10f6d870c0c Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
-rw-r--r--src/plugins/wmf/player/mfvideorenderercontrol.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/wmf/player/mfvideorenderercontrol.cpp b/src/plugins/wmf/player/mfvideorenderercontrol.cpp
index b06bfbe16..b22db19b4 100644
--- a/src/plugins/wmf/player/mfvideorenderercontrol.cpp
+++ b/src/plugins/wmf/player/mfvideorenderercontrol.cpp
@@ -813,7 +813,7 @@ namespace
case QVideoFrame::Format_RGB32:
mediaType->SetGUID(MF_MT_SUBTYPE, MFVideoFormat_RGB32);
break;
- case QVideoFrame::Format_RGB24:
+ case QVideoFrame::Format_BGR24: // MFVideoFormat_RGB24 has a BGR layout
mediaType->SetGUID(MF_MT_SUBTYPE, MFVideoFormat_RGB24);
break;
case QVideoFrame::Format_RGB565:
@@ -1082,6 +1082,7 @@ namespace
return format.frameWidth() * 4;
// 24 bpp packed formats.
case QVideoFrame::Format_RGB24:
+ case QVideoFrame::Format_BGR24:
return PAD_TO_DWORD(format.frameWidth() * 3);
// 16 bpp packed formats.
case QVideoFrame::Format_RGB565: