[vlc-devel] [PATCH 3/5] dxva2: add logs about reference counters
Steve Lhomme
robux4 at ycbcr.xyz
Tue Jan 16 16:33:24 CET 2018
---
modules/codec/avcodec/dxva2.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index 64d6f56500..029971c488 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -685,6 +685,7 @@ static int DxCreateVideoDecoder(vlc_va_t *va, int codec_id,
/* Create the decoder */
IDirectXVideoDecoder *decoder;
+ /* adds a reference on each decoder surface */
if (FAILED(IDirectXVideoDecoderService_CreateVideoDecoder(sys->d3ddec,
&sys->input,
&dsc,
@@ -710,6 +711,7 @@ static void DxDestroyVideoDecoder(vlc_va_t *va)
directx_sys_t *dx_sys = &va->sys->dx_sys;
if (dx_sys->decoder)
{
+ /* releases a reference on each decoder surface */
IDirectXVideoDecoder_Release(dx_sys->decoder);
dx_sys->decoder = NULL;
for (unsigned i = 0; i < dx_sys->va_pool.surface_count; i++)
--
2.14.2
More information about the vlc-devel
mailing list