diff options
Diffstat (limited to 'src/plugins/wmf/player/mfvideorenderercontrol.cpp')
-rw-r--r-- | src/plugins/wmf/player/mfvideorenderercontrol.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/wmf/player/mfvideorenderercontrol.cpp b/src/plugins/wmf/player/mfvideorenderercontrol.cpp index 94271d4e1..32806a852 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: @@ -842,8 +842,11 @@ namespace mediaType->Release(); continue; } - m_pixelFormats.push_back(format); - m_mediaTypes.push_back(mediaType); + // QAbstractVideoSurface::supportedPixelFormats() returns formats in descending + // order of preference, while IMFMediaTypeHandler is supposed to return supported + // formats in ascending order of preference. We need to reverse the list. + m_pixelFormats.prepend(format); + m_mediaTypes.prepend(mediaType); } } @@ -1082,6 +1085,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: |