]> git.sesse.net Git - vlc/blobdiff - src/playlist/engine.c
Cosmetic.
[vlc] / src / playlist / engine.c
index c01450e1e299d694d11d0d6e5888d598fb8ce43e..4a1e37e3544c2263c3ce82b46a1dd3cab48ed1a8 100644 (file)
@@ -107,9 +107,11 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
         return NULL;
 
     /* Create playlist and media library */
+    PL_LOCK; /* playlist_NodesPairCreate will check for it */
     playlist_NodesPairCreate( p_playlist, _( "Playlist" ),
                             &p_playlist->p_local_category,
                             &p_playlist->p_local_onelevel, false );
+    PL_UNLOCK;
 
     p_playlist->p_local_category->i_flags |= PLAYLIST_RO_FLAG;
     p_playlist->p_local_onelevel->i_flags |= PLAYLIST_RO_FLAG;
@@ -121,9 +123,11 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
 
     if( config_GetInt( p_playlist, "media-library") )
     {
+        PL_LOCK; /* playlist_NodesPairCreate will check for it */
         playlist_NodesPairCreate( p_playlist, _( "Media Library" ),
                             &p_playlist->p_ml_category,
                             &p_playlist->p_ml_onelevel, false );
+        PL_UNLOCK;
 
         if(!p_playlist->p_ml_category || !p_playlist->p_ml_onelevel)
             return NULL;
@@ -272,7 +276,6 @@ input_thread_t * playlist_CurrentInput( playlist_t * p_playlist )
     return p_input;
 }
 
-
 /**
  * @}
  */
@@ -439,11 +442,11 @@ check_input:
                 }
                 ObjectGarbageCollector( p_playlist, true );
                 return;
-             }
-             playlist_PlayItem( p_playlist, p_item );
-         }
-         else
-         {
+            }
+            playlist_PlayItem( p_playlist, p_item );
+        }
+        else
+        {
             const bool b_gc_forced = p_playlist->status.i_status != PLAYLIST_STOPPED;
 
             p_playlist->status.i_status = PLAYLIST_STOPPED;