[vlc-commits] dxva2: add logs about reference counters
Steve Lhomme
git at videolan.org
Wed Jan 17 16:13:09 CET 2018
vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jan 16 13:45:11 2018 +0100| [919ce4c5f6519bc74e3dedd3739bd500e731127f] | committer: Jean-Baptiste Kempf
dxva2: add logs about reference counters
(cherry picked from commit 24482ce50b26b3e743ada71d159d8d12b2fceb9a)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=919ce4c5f6519bc74e3dedd3739bd500e731127f
---
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++)
More information about the vlc-commits
mailing list