[vlc-devel] [PATCH] asf: Fix leak on duplicated stream ids

Hugo Beauzée-Luyssen hugo at beauzee.fr
Mon Aug 12 13:48:51 CEST 2019


---
 modules/demux/asf/asf.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
index d9f359fcd3..9bc4b3de70 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -873,6 +873,10 @@ static int DemuxInit( demux_t *p_demux )
                                i_stream );
         p_esp = NULL;
 
+        /* Ignore duplicated streams numbers */
+        if (p_sys->track[p_sp->i_stream_number])
+            continue;
+
         tk = p_sys->track[p_sp->i_stream_number] = malloc( sizeof( asf_track_t ) );
         if (!tk)
             goto error;
-- 
2.20.1



More information about the vlc-devel mailing list