On Mon, 19 Dec 2016 13:04:38 +0100 Anton Khirnov <[email protected]> wrote:
> Quoting Steve Lhomme (2016-12-16 11:05:40) > > From: Steve Lhomme <[email protected]> > > > > + ZeroMemory(&texDesc, sizeof(texDesc)); > > Isn't this just memset(.., 0, ..)? He should use "D3D11_TEXTURE2D_DESC texDesc = {0};" in the first place. For arrays, a calloc-style function should be used. > > + if (device) { > > + HMODULE dxgilib = LoadLibrary("dxgi.dll"); > > + if (dxgilib) { > > In what circumstances will this library be missing? I think if the > caller requests a specific device and this function is unable to > deliver, it should fail, not return some random otehr device. The DLL is always available as long as D3D11 is. IMHO, we should execute all these LoadLibrary and GetProcAddress in an init_once function, and store them in global variables. Unloading them is just wasted effort (and apparently even can make some drivers crash under certain circumstances). _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
