[vlc-commits] d3d11_fmt: don't nullify after a release
Steve Lhomme
git at videolan.org
Thu Jun 22 17:27:23 CEST 2017
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Tue Jun 20 10:10:39 2017 +0200| [9c2a8de22b7544057fbdaf53eb6f7aee808d0f69] | committer: Jean-Baptiste Kempf
d3d11_fmt: don't nullify after a release
There might be more than one acquire now between the decoder and display
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9c2a8de22b7544057fbdaf53eb6f7aee808d0f69
---
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 */
More information about the vlc-commits
mailing list