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

Francois Cartegnie git at videolan.org
Fri Apr 27 15:32:53 CEST 2018


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Apr 23 20:00:22 2018 +0200| [b312fdcf402f2df85c3307580c8bde060be03b39] | committer: Hugo Beauzée-Luyssen

demux: ogg: fix leak on double stream end

(cherry picked from commit 55ea5b00f528630bc8c8f80dd916ec82f13c74e2)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

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

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

diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index 5b45c405ab..f616d1b921 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