[vlc-devel] [PATCH 16/17] d3d11_fmt: don't nullify after a release
Steve Lhomme
robux4 at videolabs.io
Tue Jun 20 17:45:48 CEST 2017
There might be more than one acquire now between the decoder and display
---
modules/video_chroma/d3d11_fmt.h | 20 +++++---------------
1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/modules/video_chroma/d3d11_fmt.h b/modules/video_chroma/d3d11_fmt.h
index 13e109e5ed..3fdbad2137 100644
--- a/modules/video_chroma/d3d11_fmt.h
+++ b/modules/video_chroma/d3d11_fmt.h
@@ -73,27 +73,17 @@ static inline void AcquirePictureSys(picture_sys_t *p_sys)
static inline void ReleasePictureSys(picture_sys_t *p_sys)
{
for (int i=0; i<D3D11_MAX_SHADER_VIEW; i++) {
- if (p_sys->resourceView[i]) {
+ if (p_sys->resourceView[i])
ID3D11ShaderResourceView_Release(p_sys->resourceView[i]);
- p_sys->resourceView[i] = NULL;
- }
- if (p_sys->texture[i]) {
+ if (p_sys->texture[i])
ID3D11Texture2D_Release(p_sys->texture[i]);
- p_sys->texture[i] = NULL;
- }
}
- if (p_sys->context) {
+ if (p_sys->context)
ID3D11DeviceContext_Release(p_sys->context);
- p_sys->context = NULL;
- }
- if (p_sys->decoder) {
+ if (p_sys->decoder)
ID3D11VideoDecoderOutputView_Release(p_sys->decoder);
- p_sys->decoder = NULL;
- }
- if (p_sys->processorInput) {
+ if (p_sys->processorInput)
ID3D11VideoProcessorInputView_Release(p_sys->processorInput);
- p_sys->processorInput = NULL;
- }
}
/* map texture planes to resource views */
--
2.12.1
More information about the vlc-devel
mailing list