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>
This commit is contained in:
Yoann Lopes
2015-03-12 15:56:01 +01:00
parent 7e9520e8d3
commit 4f7e5bf169

View File

@@ -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);
}
}