Nikolay Sivov (@nsivov) commented about dlls/mfmediaengine/main.c:
- /* Check if supplied format is valid for render targets. */
- memset(&texture_desc, 0, sizeof(D3D11_TEXTURE2D_DESC));
- texture_desc.Width = 320;
- texture_desc.Height = 240;
- texture_desc.MipLevels = 1;
- texture_desc.ArraySize = 1;
- texture_desc.Format = output_format;
- texture_desc.SampleDesc.Count = 1;
- texture_desc.Usage = D3D11_USAGE_DEFAULT;
- texture_desc.BindFlags = D3D11_BIND_RENDER_TARGET;
- if (FAILED(ID3D11Device_CreateTexture2D(device, &texture_desc, NULL, &texture)))
return MF_E_INVALIDMEDIATYPE;
- ID3D11Texture2D_Release(texture);
- media_engine_unlock_d3d_device(engine, device);
Is this really different from D3D11_FORMAT_SUPPORT_RENDER_TARGET? More importantly, what difference does this output format attribute really make? We are not using internally created texture as a render target, so why check for such support?