[vlc-commits] input: fix title update leak
Francois Cartegnie
git at videolan.org
Thu Dec 5 14:15:11 CET 2019
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Dec 4 18:32:54 2019 +0100| [1e477b0dc69096154577ab68860deabf8d11a45d] | committer: Francois Cartegnie
input: fix title update leak
regression from fbec8c85c89d4120235f7e593d39f4ddd0402db9
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1e477b0dc69096154577ab68860deabf8d11a45d
---
src/input/input.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/input/input.c b/src/input/input.c
index dd26edfd6b..b6ee5faf9e 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2383,6 +2383,12 @@ static void UpdateTitleListfromDemux( input_thread_t *p_input )
/* Delete the preexisting titles */
bool had_titles = in->i_title > 0;
+ if( had_titles )
+ {
+ for( int i = 0; i < in->i_title; i++ )
+ vlc_input_title_Delete( in->title[i] );
+ TAB_CLEAN( in->i_title, in->title );
+ }
/* Get the new title list */
if( demux_Control( in->p_demux, DEMUX_GET_TITLE_INFO,
More information about the vlc-commits
mailing list