Bug 1344909 When compiled with MinGW, use only a single core in gmp-clearkey
MozReview-Commit-ID: Ej9avF7TkaL
--- a/media/gmp-clearkey/0.1/VideoDecoder.cpp
+++ b/media/gmp-clearkey/0.1/VideoDecoder.cpp
@@ -32,17 +32,23 @@ VideoDecoder::VideoDecoder(Host_8 *aHost
{
CK_LOGD("VideoDecoder created");
// We drop the ref in DecodingComplete().
AddRef();
mDecoder = new WMFH264Decoder();
+ // MinGW Does not support std::thread (See #1349912)
+#ifdef __MINGW32__
+ uint32_t cores = 1u;
+#else
uint32_t cores = std::max(1u, std::thread::hardware_concurrency());
+#endif
+
HRESULT hr = mDecoder->Init(cores);
}
VideoDecoder::~VideoDecoder()
{
CK_LOGD("VideoDecoder destroyed");
}