summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@theqtcompany.com>2015-03-12 15:56:01 +0100
committerYoann Lopes <yoann.lopes@theqtcompany.com>2015-03-24 16:03:13 +0000
commit4f7e5bf169868dfd0428a7f966e51dcac5a50178 (patch)
tree4b0728a72f5456cc30f5d16fdad5993f2c22d5b4
parent7e9520e8d39f584b4405d7670fe6aa734e7b4fdb (diff)
WMF: report the surface's supported formats in the correct order.
QAbstractVideoSurface::supportedFormats() returns the formats in descending order of preference while IMFMediaTypeHandler expects the list to be in ascending order. Change-Id: I0ecb5a3b228c0cad78c1a84091e3c3cf272f7ebc Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
-rw-r--r--src/plugins/wmf/player/mfvideorenderercontrol.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/wmf/player/mfvideorenderercontrol.cpp b/src/plugins/wmf/player/mfvideorenderercontrol.cpp
index b22db19b4..1172fe56f 100644
--- a/src/plugins/wmf/player/mfvideorenderercontrol.cpp
+++ b/src/plugins/wmf/player/mfvideorenderercontrol.cpp
@@ -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);
}
}