[vlc-commits] pva: fix leak
Rémi Denis-Courmont
git at videolan.org
Mon Nov 27 18:21:53 CET 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Nov 27 19:21:04 2017 +0200| [b796710dd7f3ab079b9b27fb2fea58da7c165306] | committer: Rémi Denis-Courmont
pva: fix leak
Block chain MUST be gathered before sending out.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b796710dd7f3ab079b9b27fb2fea58da7c165306
---
modules/demux/pva.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/demux/pva.c b/modules/demux/pva.c
index 5dad1b86fa..7b52249a21 100644
--- a/modules/demux/pva.c
+++ b/modules/demux/pva.c
@@ -219,6 +219,10 @@ static int Demux( demux_t *p_demux )
{
es_out_SetPCR( p_demux->out, p_frame->i_pts);
}
+
+ p_frame = block_ChainGather( p_frame );
+ if( unlikely(p_frame == NULL) )
+ abort();
es_out_Send( p_demux->out, p_sys->p_video, p_frame );
p_sys->p_es = NULL;
@@ -429,6 +433,8 @@ static void ParsePES( demux_t *p_demux )
}
p_pes = block_ChainGather( p_pes );
+ if( unlikely(p_pes == NULL) )
+ abort();
if( p_pes->i_buffer <= i_skip )
{
block_ChainRelease( p_pes );
More information about the vlc-commits
mailing list