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