[vlc-devel] [PATCH 4/7] playlist: cancel preparsing upon playback

Rémi Denis-Courmont remi at remlab.net
Wed Mar 29 21:13:39 CEST 2017


Le perjantaina 24. maaliskuuta 2017, 3.28.31 EEST Filip Roséen a écrit :
> This will cancel any pending request for preparsing the relevant
> playlist_item_t as preparsing the entity:
> 
>  - is redundant since we are about to start playback,

Yes but I don´t see how this prevents the next two problems short of 
unwarranted sunny day case timing assumptions.

>  - can remove metadata added during playback, and;
>  - can lead to duplicate entries in the playlist if the
>    playlist_item_t is a directory (as children are added each time
>    such entity is "played").
> 
> fixes: #17441
> fixes: #17232
> ---
>  src/playlist/item.c   | 2 +-
>  src/playlist/thread.c | 2 ++
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/playlist/item.c b/src/playlist/item.c
> index b166155387..9d77a663ad 100644
> --- a/src/playlist/item.c
> +++ b/src/playlist/item.c
> @@ -776,7 +776,7 @@ static void GoAndPreparse( playlist_t *p_playlist, int
> i_mode, if( sys->b_preparse && !input_item_IsPreparsed( p_item->p_input )
> && (EMPTY_STR(psz_artist) || EMPTY_STR(psz_album)) )
>          libvlc_MetadataRequest( p_playlist->obj.libvlc, p_item->p_input, 0,
> -1, -                                NULL );
> +                                p_item );
>      free( psz_artist );
>      free( psz_album );
>  }
> diff --git a/src/playlist/thread.c b/src/playlist/thread.c
> index 5e198a0a14..933244de75 100644
> --- a/src/playlist/thread.c
> +++ b/src/playlist/thread.c
> @@ -205,6 +205,8 @@ static bool PlayItem( playlist_t *p_playlist,
> playlist_item_t *p_item ) assert( p_sys->p_input == NULL );
>      PL_UNLOCK;
> 
> +    libvlc_MetadataCancel( p_playlist->obj.libvlc, p_item );
> +
>      input_thread_t *p_input_thread = input_Create( p_playlist, p_input,
> NULL, p_sys->p_input_resource ); if( likely(p_input_thread != NULL) )


-- 
雷米‧德尼-库尔蒙
https://www.remlab.net/



More information about the vlc-devel mailing list