]> git.sesse.net Git - vlc/blobdiff - src/playlist/loadsave.c
Sync PO files
[vlc] / src / playlist / loadsave.c
index 3ffbe5715a25931f2a4be635bcce20a53253a9f0..4c56c363ec7aca8e781bb8362a51f887a66d22ea 100644 (file)
@@ -44,16 +44,13 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename ,
 
     if( p_export_root == NULL ) return VLC_EGENERIC;
 
-    msg_Info( p_playlist, "saving %s to file %s",
+    msg_Dbg( p_playlist, "saving %s to file %s",
                     p_export_root->p_input->psz_name, psz_filename );
 
     /* Prepare the playlist_export_t structure */
     p_export = (playlist_export_t *)malloc( sizeof(playlist_export_t) );
     if( !p_export)
-    {
-        msg_Err( p_playlist, "out of memory" );
         return VLC_ENOMEM;
-    }
     p_export->psz_filename = NULL;
     if ( psz_filename )
         p_export->psz_filename = strdup( psz_filename );
@@ -68,7 +65,7 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename ,
     p_export->p_root = p_export_root;
 
     /* Lock the playlist */
-    vlc_mutex_lock( &p_playlist->object_lock );
+    vlc_object_lock( p_playlist );
     p_playlist->p_private = (void *)p_export;
 
     /* And call the module ! All work is done now */
@@ -76,7 +73,7 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename ,
     if( !p_module )
     {
         msg_Warn( p_playlist, "exporting playlist failed" );
-        vlc_mutex_unlock( &p_playlist->object_lock );
+        vlc_object_unlock( p_playlist );
         return VLC_ENOOBJ;
     }
     module_Unneed( p_playlist , p_module );
@@ -86,7 +83,7 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename ,
     free( p_export->psz_filename );
     free ( p_export );
     p_playlist->p_private = NULL;
-    vlc_mutex_unlock( &p_playlist->object_lock );
+    vlc_object_unlock( p_playlist );
 
     return VLC_SUCCESS;
 }
@@ -103,7 +100,7 @@ static void input_item_subitem_added( const vlc_event_t * p_event,
     /* playlist_AddInput() can fail, but we have no way to report that ..
      * Any way when it has failed, either the playlist is dying, either OOM */
     playlist_AddInput( p_playlist, p_item, PLAYLIST_APPEND, PLAYLIST_END,
-            false, false );
+            false, pl_Unlocked );
 }
 
 int playlist_MLLoad( playlist_t *p_playlist )
@@ -143,7 +140,7 @@ int playlist_MLLoad( playlist_t *p_playlist )
     const char *const psz_option = "meta-file";
     /* that option has to be cleaned in input_item_subitem_added() */
     /* vlc_gc_decref() in the same function */
-    p_input = input_ItemNewExt( p_playlist, psz_uri,
+    p_input = input_item_NewExt( p_playlist, psz_uri,
                                 _("Media Library"), 1, &psz_option, -1 );
     if( p_input == NULL )
         goto error;