[vlc-devel] [PATCH] demux/pva: Close: properly release allocated block-chain

Filip Roséen filip at atch.se
Fri May 19 14:44:30 CEST 2017


p_sys->p_es and p_sys->p_pes are treated as block-chains, and not as
single blocks. As such block_ChainRelease shall be used to release the
full chain, as block_Release will only release the front-most block.

fixes: #17997
---
 modules/demux/pva.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/pva.c b/modules/demux/pva.c
index d76723ceec..978893aab0 100644
--- a/modules/demux/pva.c
+++ b/modules/demux/pva.c
@@ -128,8 +128,8 @@ static void Close( vlc_object_t *p_this )
     demux_t     *p_demux = (demux_t*)p_this;
     demux_sys_t *p_sys = p_demux->p_sys;
 
-    if( p_sys->p_es )  block_Release( p_sys->p_es );
-    if( p_sys->p_pes ) block_Release( p_sys->p_pes );
+    if( p_sys->p_es )  block_ChainRelease( p_sys->p_es );
+    if( p_sys->p_pes ) block_ChainRelease( p_sys->p_pes );
 
     free( p_sys );
 }
-- 
2.12.2


More information about the vlc-devel mailing list