]> git.sesse.net Git - vlc/blobdiff - modules/gui/wince/open.cpp
Use pl_Release with the right argument.
[vlc] / modules / gui / wince / open.cpp
index b3f65e5d1f6d04b1acdab7559be8430cade138e4..6a2d3e12239d2c383ac191bd50b36e25ad77cba0 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
 #include <vlc_interface.h>
 
 #include "wince.h"
@@ -306,7 +310,7 @@ void OpenDialog::FilePanel( HWND hwnd )
         sz_subsfile += psz_subsfile;
         subsfile_mrl.push_back( sz_subsfile );
     }
-    if( psz_subsfile ) free( psz_subsfile );
+    free( psz_subsfile );
 }
 
 void OpenDialog::NetPanel( HWND hwnd )
@@ -605,16 +609,14 @@ void OpenDialog::OnOk()
     ComboBox_SetCurSel( mrl_combo, ComboBox_GetCount( mrl_combo ) - 1 );
 
     /* 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 < i_args; i++ )
     {
-        vlc_bool_t b_start = !i && i_open_arg;
+        bool b_start = !i && i_open_arg;
         playlist_item_t *p_item =
-            playlist_ItemNew( p_intf, pp_args[i], pp_args[i] );
+            playlist_ItemNew( p_playlist, pp_args[i], pp_args[i] );
 
         /* Insert options */
         while( i + 1 < i_args && pp_args[i + 1][0] == ':' )
@@ -653,7 +655,7 @@ void OpenDialog::OnOk()
         free( pp_args[i_args] );
         if( !i_args ) free( pp_args );
     }
-    vlc_object_release( p_playlist );
+    pl_Release( p_intf );
 }
 
 /*****************************************************************************