[vlc-devel] [PATCH 4/7] playlist: cancel preparsing upon playback
Filip Roséen
filip at atch.se
Wed Mar 29 21:38:43 CEST 2017
Hi Rémi,
On 2017-03-29 22:13, Rémi Denis-Courmont wrote:
> 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.
There are other paths where the problem might arise, but for all of
those cases the preparsing does not originate from the relevant code
of the below listed files:
- `src/playlist/thread.c`
- `src/playlist/engine.c`
- `src/playlist/item.c`
What is described in the commit message you are referring to is what
it addresses, not cases from outside of the scope of the changes.
> > - 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/
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170329/b611be58/attachment.html>
More information about the vlc-devel
mailing list