[vlc-commits] playlist: use playlist preparser for playlist items (fixes #10344)

Rémi Denis-Courmont git at videolan.org
Mon Mar 10 20:36:16 CET 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Mar 10 21:32:13 2014 +0200| [7cf9657350304f296b728bb94671d8f255bb1294] | committer: Rémi Denis-Courmont

playlist: use playlist preparser for playlist items (fixes #10344)

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

 src/playlist/item.c |   24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/playlist/item.c b/src/playlist/item.c
index 1aa5d56..1f1f43c 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -752,27 +752,27 @@ mtime_t playlist_GetNodeDuration( playlist_item_t* node )
 static void GoAndPreparse( playlist_t *p_playlist, int i_mode,
                            playlist_item_t *p_item )
 {
+    playlist_private_t *sys = pl_priv(p_playlist);
+
     PL_ASSERT_LOCKED;
     if( (i_mode & PLAYLIST_GO ) )
     {
-        pl_priv(p_playlist)->request.b_request = true;
-        pl_priv(p_playlist)->request.i_skip = 0;
-        pl_priv(p_playlist)->request.p_item = p_item;
-        if( pl_priv(p_playlist)->p_input )
-            input_Stop( pl_priv(p_playlist)->p_input, true );
-        pl_priv(p_playlist)->request.i_status = PLAYLIST_RUNNING;
-        vlc_cond_signal( &pl_priv(p_playlist)->signal );
+        sys->request.b_request = true;
+        sys->request.i_skip = 0;
+        sys->request.p_item = p_item;
+        if( sys->p_input != NULL )
+            input_Stop( sys->p_input, true );
+        sys->request.i_status = PLAYLIST_RUNNING;
+        vlc_cond_signal( &sys->signal );
     }
     /* Preparse if no artist/album info, and hasn't been preparsed allready
        and if user has some preparsing option (auto-preparse variable)
        enabled*/
     char *psz_artist = input_item_GetArtist( p_item->p_input );
     char *psz_album = input_item_GetAlbum( p_item->p_input );
-    if( pl_priv(p_playlist)->b_auto_preparse &&
-        input_item_IsPreparsed( p_item->p_input ) == false &&
-            ( EMPTY_STR( psz_artist ) || ( EMPTY_STR( psz_album ) ) )
-          )
-        libvlc_MetaRequest( p_playlist->p_libvlc, p_item->p_input );
+    if( sys->b_auto_preparse && !input_item_IsPreparsed( p_item->p_input )
+     && (EMPTY_STR(psz_artist) || EMPTY_STR(psz_album)) )
+        playlist_preparser_Push( sys->p_preparser, p_item->p_input );
     free( psz_artist );
     free( psz_album );
 }



More information about the vlc-commits mailing list