[vlc-devel] [PATCH] input: fix title update leak

Thomas Guillem thomas at gllm.fr
Thu Dec 5 10:06:37 CET 2019


OK with this patch but...

On Wed, Dec 4, 2019, at 18:52, Francois Cartegnie wrote:
> regression from fbec8c85c89d4120235f7e593d39f4ddd0402db9
> ---
>  src/input/input.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/src/input/input.c b/src/input/input.c
> index dd26edfd6b..6dbe72cc93 100644
> --- a/src/input/input.c
> +++ b/src/input/input.c
> @@ -2383,7 +2383,13 @@ 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 );
> +    }
> +msg_Err(p_input,"UpdateTitleListfromDemux");

Debug log here ^^

>      /* Get the new title list */
>      if( demux_Control( in->p_demux, DEMUX_GET_TITLE_INFO,
>                         &in->title, &in->i_title,
> @@ -2668,6 +2674,7 @@ static input_source_t *InputSourceNew( 
> input_thread_t *p_input,
>       * FIXME improve for b_preparsing: move it after GET_META and 
> check psz_arturl */
>      if( !input_priv(p_input)->b_preparsing )
>      {
> +        msg_Err(p_input,"InputSourceNew");

nad here ^^
>          if( demux_Control( in->p_demux, DEMUX_GET_TITLE_INFO,
>                             &in->title, &in->i_title,
>                             &in->i_title_offset, 
> &in->i_seekpoint_offset ))
> -- 
> 2.21.0
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list