[vlc-commits] [Git][videolan/vlc][master] d3d11: always initialize sharedHandle to INVALID_HANDLE_VALUE

Steve Lhomme (@robUx4) gitlab at videolan.org
Sat Jan 21 09:41:16 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
c207f78a by Steve Lhomme at 2023-01-21T09:27:25+00:00
d3d11: always initialize sharedHandle to INVALID_HANDLE_VALUE

- - - - -


3 changed files:

- modules/codec/avcodec/d3d11va.c
- modules/codec/mft.cpp
- modules/hw/d3d11/d3d11_surface.c


Changes:

=====================================
modules/codec/avcodec/d3d11va.c
=====================================
@@ -160,6 +160,7 @@ static struct d3d11va_pic_context *CreatePicContext(
     ID3D11ShaderResourceView_GetResource(renderSrc[0], &p_resource);
 
     pic_ctx->ctx.picsys.slice_index = slice;
+    pic_ctx->ctx.picsys.sharedHandle = INVALID_HANDLE_VALUE;
     for (int i=0;i<DXGI_MAX_SHADER_VIEW; i++)
     {
         pic_ctx->ctx.picsys.resource[i] = p_resource;


=====================================
modules/codec/mft.cpp
=====================================
@@ -840,6 +840,7 @@ static mf_d3d11_pic_ctx *CreatePicContext(ID3D11Texture2D *texture, UINT slice,
     pic_ctx->ctx.s.vctx = vlc_video_context_Hold(vctx);
 
     pic_ctx->ctx.picsys.slice_index = slice;
+    pic_ctx->ctx.picsys.sharedHandle = INVALID_HANDLE_VALUE;
     for (int i=0;i<DXGI_MAX_SHADER_VIEW; i++)
     {
         pic_ctx->ctx.picsys.texture[i] = texture;


=====================================
modules/hw/d3d11/d3d11_surface.c
=====================================
@@ -654,6 +654,7 @@ static picture_t *AllocateCPUtoGPUTexture(filter_t *p_filter, filter_sys_t *p_sy
         d3d11_pic_context_destroy, d3d11_pic_context_copy,
         vlc_video_context_Hold(p_filter->vctx_out),
     };
+    pic_ctx->picsys.sharedHandle = INVALID_HANDLE_VALUE;
     AcquireD3D11PictureSys(&pic_ctx->picsys);
     ID3D11Texture2D_Release(pic_ctx->picsys.texture[KNOWN_DXGI_INDEX]);
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/c207f78a1364481952ab6f8ceaead87bdc38872f

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/c207f78a1364481952ab6f8ceaead87bdc38872f
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list