vlc | branch: master | Steve Lhomme <[email protected]> | Wed Apr 3 10:44:18 2019 +0200| [46a04fb33ffe85b7c737ccd55630ad48027b9ea6] | committer: Steve Lhomme
d3d11va: don't use a temporary conversion to log a wide char string > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=46a04fb33ffe85b7c737ccd55630ad48027b9ea6 --- modules/codec/avcodec/d3d11va.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c index fe9cabf2a8..979b2940ab 100644 --- a/modules/codec/avcodec/d3d11va.c +++ b/modules/codec/avcodec/d3d11va.c @@ -486,15 +486,10 @@ static char *DxDescribe(vlc_va_sys_t *sys) char *description = NULL; DXGI_ADAPTER_DESC adapterDesc; if (SUCCEEDED(IDXGIAdapter_GetDesc(p_adapter, &adapterDesc))) { - char *utfdesc = FromWide(adapterDesc.Description); - if (likely(utfdesc!=NULL)) - { - if (asprintf(&description, "D3D11VA (%s, vendor %x(%s), device %x, revision %x)", - utfdesc, - adapterDesc.VendorId, DxgiVendorStr(adapterDesc.VendorId), adapterDesc.DeviceId, adapterDesc.Revision) < 0) - description = NULL; - free(utfdesc); - } + if (asprintf(&description, "D3D11VA (%ls, vendor %x(%s), device %x, revision %x)", + adapterDesc.Description, + adapterDesc.VendorId, DxgiVendorStr(adapterDesc.VendorId), adapterDesc.DeviceId, adapterDesc.Revision) < 0) + description = NULL; } IDXGIAdapter_Release(p_adapter); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
