[vlc-devel] commit: Don't dump/clean media library if it's not active ( Rafaël Carré )

git version control git at videolan.org
Wed Apr 2 14:26:56 CEST 2008


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Wed Apr  2 14:26:56 2008 +0200| [ee0a4d8279e952fa99249e332687e1b6fdc79105]

Don't dump/clean media library if it's not active

Bug spotted by Anthony Loiseau

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

 src/playlist/engine.c |   24 +++++++++++++-----------
 1 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index 3c49889..a0e08fd 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -484,17 +484,19 @@ void playlist_LastLoop( playlist_t *p_playlist )
                                           p_playlist->pp_sds[0]->p_sd->psz_module );
     }
 
-    playlist_MLDump( p_playlist );
-
-    /* Because this recursive function decreases the
-     * p_playlist->p_ml_category refcount, it may get deleted.
-     * However we will delete the p_playlist->p_ml_category in the
-     * following FOREACH. */
-    vlc_gc_incref( p_playlist->p_ml_category->p_input );
-
-    /* We don't need the media library anymore */
-    /* Decref all subitems, and the given items */
-    recursively_decref( p_playlist->p_ml_category );
+    if( config_GetInt( p_playlist, "media-library" ) )
+    {
+        playlist_MLDump( p_playlist );
+        /* Because this recursive function decreases the
+         * p_playlist->p_ml_category refcount, it may get deleted.
+         * However we will delete the p_playlist->p_ml_category in the
+         * following FOREACH. */
+        vlc_gc_incref( p_playlist->p_ml_category->p_input );
+
+        /* We don't need the media library anymore */
+        /* Decref all subitems, and the given items */
+        recursively_decref( p_playlist->p_ml_category );
+    }
 
     PL_LOCK;
     FOREACH_ARRAY( playlist_item_t *p_del, p_playlist->all_items )




More information about the vlc-devel mailing list