[vlc-commits] demux: ogg: fix leak on double stream end

Francois Cartegnie git at videolan.org
Mon Apr 23 20:17:49 CEST 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Apr 23 20:00:22 2018 +0200| [55ea5b00f528630bc8c8f80dd916ec82f13c74e2] | committer: Francois Cartegnie

demux: ogg: fix leak on double stream end

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=55ea5b00f528630bc8c8f80dd916ec82f13c74e2
---

 modules/demux/ogg.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index 5439792910..44324962da 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -311,6 +311,8 @@ static int Demux( demux_t * p_demux )
              * only 1 ES is supported (common case for ogg web radio) */
             if( p_sys->i_streams == 1 && p_sys->pp_stream[0]->p_es )
             {
+                if( p_sys->p_old_stream ) /* if no setupEs has reused */
+                    Ogg_LogicalStreamDelete( p_demux, p_sys->p_old_stream );
                 p_sys->p_old_stream = p_sys->pp_stream[0];
                 TAB_CLEAN( p_sys->i_streams, p_sys->pp_stream );
             }



More information about the vlc-commits mailing list