]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwidgets/dialogs/open.cpp
Use pl_Release with the right argument.
[vlc] / modules / gui / wxwidgets / dialogs / open.cpp
index e487eecebd1f8b7598bd561a13015370b51ccb48..7430c62290d8bec87ab11ee5bbef3bd144f98ce8 100644 (file)
@@ -1158,14 +1158,12 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
     }
 
     /* Update the playlist */
-    playlist_t *p_playlist =
-        (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
-                                       FIND_ANYWHERE );
+    playlist_t *p_playlist = pl_Yield( p_intf );
     if( p_playlist == NULL ) return;
 
     for( int i = 0; i < (int)mrl.GetCount(); i++ )
     {
-        vlc_bool_t b_start = !i && i_open_arg;
+        bool b_start = !i && i_open_arg;
         input_item_t *p_input;
         char *psz_utf8;
 
@@ -1208,10 +1206,10 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
         /* FIXME: playlist_AddInput() can fail */
         playlist_AddInput( p_playlist, p_input,
                PLAYLIST_APPEND | ( b_start ? PLAYLIST_GO : PLAYLIST_PREPARSE ),
-               PLAYLIST_END, VLC_TRUE, VLC_FALSE );
+               PLAYLIST_END, true, pl_Unlocked );
+        vlc_gc_decref( p_input );
     }
-
-    vlc_object_release( p_playlist );
+    pl_Release( p_intf );
 
     Hide();
 
@@ -1883,7 +1881,7 @@ void OpenDialog::OnCachingChange( wxCommandEvent& event )
  *****************************************************************************/
 wxArrayString SeparateEntries( wxString entries )
 {
-    vlc_bool_t b_quotes_mode = VLC_FALSE;
+    bool b_quotes_mode = false;
 
     wxArrayString entries_array;
     wxString entry;
@@ -1900,13 +1898,13 @@ wxArrayString SeparateEntries( wxString entries )
         {
             /* Enters quotes mode */
             entry.RemoveLast();
-            b_quotes_mode = VLC_TRUE;
+            b_quotes_mode = true;
         }
         else if( b_quotes_mode && entry.Last() == wxT('\"') )
         {
             /* Finished the quotes mode */
             entry.RemoveLast();
-            b_quotes_mode = VLC_FALSE;
+            b_quotes_mode = false;
         }
         else if( !b_quotes_mode && entry.Last() != wxT('\"') )
         {