[vlc-devel] [PATCH] demux: plug leaks
Shaleen Jain
shaleen.jain95 at gmail.com
Mon Jul 31 14:08:14 CEST 2017
---
modules/demux/avformat/demux.c | 1 +
modules/demux/mpeg/es.c | 2 ++
modules/demux/nsv.c | 3 +++
3 files changed, 6 insertions(+)
diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index 22fa9aae5a..d58dfd2c36 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -620,6 +620,7 @@ int OpenDemux( vlc_object_t *p_this )
psz_type, (char*)&fcc, cp->codec_id );
}
TAB_APPEND( p_sys->i_tk, p_sys->tk, es );
+ es_out_Del( p_demux->out, es );
}
p_sys->tk_pcr = xcalloc( p_sys->i_tk, sizeof(*p_sys->tk_pcr) );
diff --git a/modules/demux/mpeg/es.c b/modules/demux/mpeg/es.c
index 5d646ac2c4..2392af88e9 100644
--- a/modules/demux/mpeg/es.c
+++ b/modules/demux/mpeg/es.c
@@ -371,6 +371,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;
+ es_out_Del( p_demux->out, p_sys->p_es);
+
if( p_sys->p_packetized_data )
block_ChainRelease( p_sys->p_packetized_data );
if( p_sys->mllt.p_bits )
diff --git a/modules/demux/nsv.c b/modules/demux/nsv.c
index 033149c220..98a88004ca 100644
--- a/modules/demux/nsv.c
+++ b/modules/demux/nsv.c
@@ -139,6 +139,9 @@ 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;
+ es_out_Del( p_demux->out, p_sys->p_sub );
+ es_out_Del( p_demux->out, p_sys->p_audio );
+ es_out_Del( p_demux->out, p_sys->p_video );
free( p_sys );
}
--
2.13.3
More information about the vlc-devel
mailing list