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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user