[vlc-commits] direct3d11: set the picture_sys_t values when we know they are valid
Steve Lhomme
git at videolan.org
Fri Nov 30 11:55:26 CET 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Nov 30 11:46:10 2018 +0100| [29815d60746a184bddd67a21f2c49d9e470ed70e] | committer: Steve Lhomme
direct3d11: set the picture_sys_t values when we know they are valid
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=29815d60746a184bddd67a21f2c49d9e470ed70e
---
modules/video_output/win32/direct3d11.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 50d83e6107..a600e63182 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -495,10 +495,6 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned pool_size)
for (unsigned plane = 0; plane < D3D11_MAX_SHADER_VIEW; plane++)
picsys->texture[plane] = textures[picture_count * D3D11_MAX_SHADER_VIEW + plane];
- picsys->slice_index = picture_count;
- picsys->formatTexture = sys->picQuad.textureFormat->formatTexture;
- picsys->context = sys->d3d_dev.d3dcontext;
-
picture_resource_t resource = {
.p_sys = picsys,
.pf_destroy = DestroyDisplayPoolPicture,
@@ -512,8 +508,11 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned pool_size)
}
pictures[picture_count] = picture;
+ picsys->slice_index = picture_count;
+ picsys->formatTexture = sys->picQuad.textureFormat->formatTexture;
/* each picture_t holds a ref to the context and release it on Destroy */
- ID3D11DeviceContext_AddRef(picsys->context);
+ picsys->context = sys->d3d_dev.d3dcontext;
+ ID3D11DeviceContext_AddRef(sys->d3d_dev.d3dcontext);
}
#ifdef HAVE_ID3D11VIDEODECODER
More information about the vlc-commits
mailing list