Commit 415ada5a authored by Rémi Duraffort's avatar Rémi Duraffort

Use pl_Release with the right argument.

parent c0538c2c
...@@ -227,7 +227,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len) ...@@ -227,7 +227,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len)
{ {
msg_Err( p_access, "unable to find item in playlist" ); msg_Err( p_access, "unable to find item in playlist" );
vlc_object_release( p_input ); vlc_object_release( p_input );
pl_Release( p_playlist ); pl_Release( p_access );
return VLC_ENOOBJ; return VLC_ENOOBJ;
} }
......
...@@ -309,7 +309,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -309,7 +309,7 @@ static int Open( vlc_object_t *p_this )
if( psz_file_name && if( psz_file_name &&
asprintf( &psz_txt, "path=%s", psz_file_name ) == -1 ) asprintf( &psz_txt, "path=%s", psz_file_name ) == -1 )
{ {
pl_Release( p_playlist ); pl_Release( p_access );
free( psz_uri ); free( psz_uri );
return VLC_ENOMEM; return VLC_ENOMEM;
} }
...@@ -323,7 +323,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -323,7 +323,7 @@ static int Open( vlc_object_t *p_this )
if( p_sys->p_bonjour == NULL ) if( p_sys->p_bonjour == NULL )
msg_Err( p_access, "unable to start requested Bonjour announce" ); msg_Err( p_access, "unable to start requested Bonjour announce" );
pl_Release( p_playlist ); pl_Release( p_access );
} }
else else
p_sys->p_bonjour = NULL; p_sys->p_bonjour = NULL;
......
...@@ -309,7 +309,7 @@ DBUS_METHOD( Pause ) ...@@ -309,7 +309,7 @@ DBUS_METHOD( Pause )
REPLY_INIT; REPLY_INIT;
playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this ); playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
playlist_Pause( p_playlist ); playlist_Pause( p_playlist );
pl_Release( p_playlist ); pl_Release( (vlc_object_t*) p_this );
REPLY_SEND; REPLY_SEND;
} }
...@@ -333,7 +333,7 @@ DBUS_METHOD( Play ) ...@@ -333,7 +333,7 @@ DBUS_METHOD( Play )
else else
playlist_Play( p_playlist ); playlist_Play( p_playlist );
pl_Release( p_playlist ); pl_Release( (vlc_object_t*) p_this );
REPLY_SEND; REPLY_SEND;
} }
...@@ -346,7 +346,7 @@ DBUS_METHOD( GetCurrentMetadata ) ...@@ -346,7 +346,7 @@ DBUS_METHOD( GetCurrentMetadata )
if( p_playlist->status.p_item ) if( p_playlist->status.p_item )
GetInputMeta( p_playlist->status.p_item->p_input, &args ); GetInputMeta( p_playlist->status.p_item->p_input, &args );
PL_UNLOCK; PL_UNLOCK;
pl_Release( p_playlist ); pl_Release( (vlc_object_t*) p_this );
REPLY_SEND; REPLY_SEND;
} }
...@@ -410,7 +410,7 @@ DBUS_METHOD( AddTrack ) ...@@ -410,7 +410,7 @@ DBUS_METHOD( AddTrack )
playlist_Add( p_playlist, psz_mrl, NULL, PLAYLIST_APPEND | playlist_Add( p_playlist, psz_mrl, NULL, PLAYLIST_APPEND |
( ( b_play == TRUE ) ? PLAYLIST_GO : 0 ) , ( ( b_play == TRUE ) ? PLAYLIST_GO : 0 ) ,
PLAYLIST_END, true, false ); PLAYLIST_END, true, false );
pl_Release( p_playlist ); pl_Release( (vlc_object_t*) p_this );
dbus_int32_t i_success = 0; dbus_int32_t i_success = 0;
ADD_INT32( &i_success ); ADD_INT32( &i_success );
...@@ -425,7 +425,7 @@ DBUS_METHOD( GetCurrentTrack ) ...@@ -425,7 +425,7 @@ DBUS_METHOD( GetCurrentTrack )
playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this ); playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
dbus_int32_t i_position = p_playlist->i_current_index; dbus_int32_t i_position = p_playlist->i_current_index;
pl_Release( p_playlist ); pl_Release( (vlc_object_t*) p_this );
ADD_INT32( &i_position ); ADD_INT32( &i_position );
REPLY_SEND; REPLY_SEND;
...@@ -450,7 +450,7 @@ DBUS_METHOD( GetMetadata ) ...@@ -450,7 +450,7 @@ DBUS_METHOD( GetMetadata )
if( dbus_error_is_set( &error ) ) if( dbus_error_is_set( &error ) )
{ {
PL_UNLOCK; PL_UNLOCK;
pl_Release( p_playlist ); pl_Release( (vlc_object_t*) p_this );
msg_Err( (vlc_object_t*) p_this, "D-Bus message reading : %s\n", msg_Err( (vlc_object_t*) p_this, "D-Bus message reading : %s\n",
error.message ); error.message );
dbus_error_free( &error ); dbus_error_free( &error );
...@@ -463,7 +463,7 @@ DBUS_METHOD( GetMetadata ) ...@@ -463,7 +463,7 @@ DBUS_METHOD( GetMetadata )
} }
PL_UNLOCK; PL_UNLOCK;
pl_Release( p_playlist ); pl_Release( (vlc_object_t*) p_this );
REPLY_SEND; REPLY_SEND;
} }
...@@ -474,7 +474,7 @@ DBUS_METHOD( GetLength ) ...@@ -474,7 +474,7 @@ DBUS_METHOD( GetLength )
playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this ); playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_this );
dbus_int32_t i_elements = p_playlist->current.i_size; dbus_int32_t i_elements = p_playlist->current.i_size;
pl_Release( p_playlist ); pl_Release( (vlc_object_t*) p_this );
ADD_INT32( &i_elements ); ADD_INT32( &i_elements );
REPLY_SEND; REPLY_SEND;
...@@ -511,7 +511,7 @@ DBUS_METHOD( DelTrack ) ...@@ -511,7 +511,7 @@ DBUS_METHOD( DelTrack )
} }
PL_UNLOCK; PL_UNLOCK;
pl_Release( p_playlist ); pl_Release( (vlc_object_t*) p_this );
REPLY_SEND; REPLY_SEND;
} }
...@@ -772,7 +772,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -772,7 +772,7 @@ static int Open( vlc_object_t *p_this )
var_AddCallback( p_playlist, "repeat", StatusChangeEmit, p_intf ); var_AddCallback( p_playlist, "repeat", StatusChangeEmit, p_intf );
var_AddCallback( p_playlist, "loop", StatusChangeEmit, p_intf ); var_AddCallback( p_playlist, "loop", StatusChangeEmit, p_intf );
PL_UNLOCK; PL_UNLOCK;
pl_Release( p_playlist ); pl_Release( p_intf );
p_intf->pf_run = Run; p_intf->pf_run = Run;
p_intf->p_sys = p_sys; p_intf->p_sys = p_sys;
...@@ -813,7 +813,7 @@ static void Close ( vlc_object_t *p_this ) ...@@ -813,7 +813,7 @@ static void Close ( vlc_object_t *p_this )
} }
PL_UNLOCK; PL_UNLOCK;
pl_Release( p_playlist ); pl_Release( p_intf );
dbus_connection_unref( p_intf->p_sys->p_conn ); dbus_connection_unref( p_intf->p_sys->p_conn );
...@@ -855,7 +855,7 @@ DBUS_SIGNAL( TrackListChangeSignal ) ...@@ -855,7 +855,7 @@ DBUS_SIGNAL( TrackListChangeSignal )
playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_data ); playlist_t *p_playlist = pl_Yield( (vlc_object_t*) p_data );
dbus_int32_t i_elements = p_playlist->current.i_size; dbus_int32_t i_elements = p_playlist->current.i_size;
pl_Release( p_playlist ); pl_Release( (vlc_object_t*) p_data );
ADD_INT32( &i_elements ); ADD_INT32( &i_elements );
SIGNAL_SEND; SIGNAL_SEND;
...@@ -1000,12 +1000,12 @@ static int TrackChange( vlc_object_t *p_this, const char *psz_var, ...@@ -1000,12 +1000,12 @@ static int TrackChange( vlc_object_t *p_this, const char *psz_var,
if( !p_input ) if( !p_input )
{ {
PL_UNLOCK; PL_UNLOCK;
pl_Release( p_playlist ); pl_Release( p_intf );
return VLC_SUCCESS; return VLC_SUCCESS;
} }
vlc_object_yield( p_input ); vlc_object_yield( p_input );
pl_Release( p_playlist ); pl_Release( p_intf );
p_item = input_GetItem( p_input ); p_item = input_GetItem( p_input );
if( !p_item ) if( !p_item )
...@@ -1033,7 +1033,7 @@ static int UpdateCaps( intf_thread_t* p_intf, bool b_playlist_locked ) ...@@ -1033,7 +1033,7 @@ static int UpdateCaps( intf_thread_t* p_intf, bool b_playlist_locked )
{ {
intf_sys_t* p_sys = p_intf->p_sys; intf_sys_t* p_sys = p_intf->p_sys;
dbus_int32_t i_caps = CAPS_CAN_HAS_TRACKLIST; dbus_int32_t i_caps = CAPS_CAN_HAS_TRACKLIST;
playlist_t* p_playlist = pl_Yield( (vlc_object_t*)p_intf ); playlist_t* p_playlist = pl_Yield( p_intf );
if( !b_playlist_locked ) PL_LOCK; if( !b_playlist_locked ) PL_LOCK;
if( p_playlist->current.i_size > 0 ) if( p_playlist->current.i_size > 0 )
...@@ -1050,7 +1050,7 @@ static int UpdateCaps( intf_thread_t* p_intf, bool b_playlist_locked ) ...@@ -1050,7 +1050,7 @@ static int UpdateCaps( intf_thread_t* p_intf, bool b_playlist_locked )
} }
if( !b_playlist_locked ) PL_UNLOCK; if( !b_playlist_locked ) PL_UNLOCK;
pl_Release( p_playlist ); pl_Release( p_intf );
if( p_sys->b_meta_read ) if( p_sys->b_meta_read )
i_caps |= CAPS_CAN_PROVIDE_METADATA; i_caps |= CAPS_CAN_PROVIDE_METADATA;
...@@ -1158,7 +1158,7 @@ static int MarshalStatus( intf_thread_t* p_intf, DBusMessageIter* args, ...@@ -1158,7 +1158,7 @@ static int MarshalStatus( intf_thread_t* p_intf, DBusMessageIter* args,
playlist_t* p_playlist = NULL; playlist_t* p_playlist = NULL;
input_thread_t* p_input = NULL; input_thread_t* p_input = NULL;
p_playlist = pl_Yield( (vlc_object_t*) p_intf ); p_playlist = pl_Yield( p_intf );
if( lock ) if( lock )
PL_LOCK; PL_LOCK;
...@@ -1184,7 +1184,7 @@ static int MarshalStatus( intf_thread_t* p_intf, DBusMessageIter* args, ...@@ -1184,7 +1184,7 @@ static int MarshalStatus( intf_thread_t* p_intf, DBusMessageIter* args,
if( lock ) if( lock )
PL_UNLOCK; PL_UNLOCK;
pl_Release( p_playlist ); pl_Release( p_intf );
dbus_message_iter_open_container( args, DBUS_TYPE_STRUCT, NULL, &status ); dbus_message_iter_open_container( args, DBUS_TYPE_STRUCT, NULL, &status );
dbus_message_iter_append_basic( &status, DBUS_TYPE_INT32, &i_state ); dbus_message_iter_append_basic( &status, DBUS_TYPE_INT32, &i_state );
......
...@@ -694,7 +694,7 @@ PlaylistView::MouseDown( BPoint where ) ...@@ -694,7 +694,7 @@ PlaylistView::MouseDown( BPoint where )
if( p_playlist ) if( p_playlist )
{ {
playlist_Goto( p_playlist, i ); playlist_Goto( p_playlist, i );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
handled = true; handled = true;
} }
...@@ -1085,7 +1085,7 @@ PlaylistView::_PlayingItem() const ...@@ -1085,7 +1085,7 @@ PlaylistView::_PlayingItem() const
} }
BListItem * item = ItemAt( p_playlist->i_index ); BListItem * item = ItemAt( p_playlist->i_index );
pl_Release( p_playlist ); pl_Release( p_intf );
return item; return item;
} }
...@@ -1109,7 +1109,7 @@ PlaylistView::_SetPlayingIndex( BListItem* playingItem ) ...@@ -1109,7 +1109,7 @@ PlaylistView::_SetPlayingIndex( BListItem* playingItem )
playlist_Goto( p_playlist, i ); playlist_Goto( p_playlist, i );
SetCurrent( i ); SetCurrent( i );
pl_Release( p_playlist ); pl_Release( p_intf );
break; break;
} }
} }
......
...@@ -294,7 +294,7 @@ PlayListWindow::UpdatePlaylist( bool rebuild ) ...@@ -294,7 +294,7 @@ PlayListWindow::UpdatePlaylist( bool rebuild )
p_playlist = pl_Yield( p_intf ); p_playlist = pl_Yield( p_intf );
fListView->SetCurrent( p_playlist->i_index ); fListView->SetCurrent( p_playlist->i_index );
fListView->SetPlaying( p_playlist->status.i_status == PLAYLIST_RUNNING ); fListView->SetPlaying( p_playlist->status.i_status == PLAYLIST_RUNNING );
pl_Release( p_playlist ); pl_Release( p_intf );
_CheckItemsEnableState(); _CheckItemsEnableState();
} }
......
...@@ -296,7 +296,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -296,7 +296,7 @@ static void Run( intf_thread_t *p_intf )
PlaylistRebuildListStore(p_intf,p_playlist_store, p_playlist); PlaylistRebuildListStore(p_intf,p_playlist_store, p_playlist);
gtk_tree_view_set_model(GTK_TREE_VIEW(p_intf->p_sys->p_tvplaylist), GTK_TREE_MODEL(p_playlist_store)); gtk_tree_view_set_model(GTK_TREE_VIEW(p_intf->p_sys->p_tvplaylist), GTK_TREE_MODEL(p_playlist_store));
g_object_unref(p_playlist_store); g_object_unref(p_playlist_store);
pl_Release(p_playlist); /* Free the playlist */ pl_Release( p_intf ); /* Free the playlist */
gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(p_intf->p_sys->p_tvplaylist)),GTK_SELECTION_MULTIPLE); gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(p_intf->p_sys->p_tvplaylist)),GTK_SELECTION_MULTIPLE);
/* Column properties */ /* Column properties */
...@@ -436,7 +436,7 @@ static int Manage( intf_thread_t *p_intf ) ...@@ -436,7 +436,7 @@ static int Manage( intf_thread_t *p_intf )
PlaylistRebuildListStore(p_intf, p_liststore, p_playlist); PlaylistRebuildListStore(p_intf, p_liststore, p_playlist);
gtk_tree_view_set_model(p_intf->p_sys->p_tvplaylist, (GtkTreeModel*) p_liststore); gtk_tree_view_set_model(p_intf->p_sys->p_tvplaylist, (GtkTreeModel*) p_liststore);
g_object_unref(p_liststore); g_object_unref(p_liststore);
pl_Release( p_playlist ); pl_Release( p_intf );
} }
/* Manage the slider */ /* Manage the slider */
......
...@@ -146,7 +146,7 @@ static void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options, ...@@ -146,7 +146,7 @@ static void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options,
free(ppsz_options); free(ppsz_options);
} }
} }
pl_Release( p_playlist ); pl_Release( p_intf );
} }
void PlaylistRebuildListStore( intf_thread_t *p_intf, void PlaylistRebuildListStore( intf_thread_t *p_intf,
...@@ -393,7 +393,7 @@ void onPlay(GtkButton *button, gpointer user_data) ...@@ -393,7 +393,7 @@ void onPlay(GtkButton *button, gpointer user_data)
{ {
vlc_object_unlock( p_playlist ); vlc_object_unlock( p_playlist );
} }
pl_Release( p_playlist ); pl_Release( p_intf );
} }
} }
...@@ -404,7 +404,7 @@ void onStop(GtkButton *button, gpointer user_data) ...@@ -404,7 +404,7 @@ void onStop(GtkButton *button, gpointer user_data)
if (p_playlist) if (p_playlist)
{ {
playlist_Stop( p_playlist ); playlist_Stop( p_playlist );
pl_Release( p_playlist ); pl_Release( p_intf );
gdk_window_raise( p_intf->p_sys->p_window->window ); gdk_window_raise( p_intf->p_sys->p_window->window );
} }
} }
...@@ -802,7 +802,7 @@ void onPlaylistRow(GtkTreeView *treeview, GtkTreePath *path, ...@@ -802,7 +802,7 @@ void onPlaylistRow(GtkTreeView *treeview, GtkTreePath *path,
i_skip = i_row - p_playlist->i_current_index; i_skip = i_row - p_playlist->i_current_index;
playlist_Skip( p_playlist, i_skip ); playlist_Skip( p_playlist, i_skip );
} }
pl_Release( p_playlist ); pl_Release( p_intf );
} }
...@@ -834,7 +834,7 @@ void onUpdatePlaylist(GtkButton *button, gpointer user_data) ...@@ -834,7 +834,7 @@ void onUpdatePlaylist(GtkButton *button, gpointer user_data)
g_object_unref(p_model); g_object_unref(p_model);
} }
} }
pl_Release( p_playlist ); pl_Release( p_intf );
} }
static void deleteItemFromPlaylist(gpointer data, gpointer user_data) static void deleteItemFromPlaylist(gpointer data, gpointer user_data)
...@@ -907,7 +907,7 @@ void onDeletePlaylist(GtkButton *button, gpointer user_data) ...@@ -907,7 +907,7 @@ void onDeletePlaylist(GtkButton *button, gpointer user_data)
g_object_unref(p_store); g_object_unref(p_store);
} }
} }
pl_Release( p_playlist ); pl_Release( p_intf );
} }
...@@ -927,7 +927,7 @@ void onClearPlaylist(GtkButton *button, gpointer user_data) ...@@ -927,7 +927,7 @@ void onClearPlaylist(GtkButton *button, gpointer user_data)
{ {
msg_Err( p_playlist, "fix pda delete" ); msg_Err( p_playlist, "fix pda delete" );
} }
pl_Release( p_playlist ); pl_Release( p_intf );
// Remove all entries from the Playlist widget. // Remove all entries from the Playlist widget.
p_tvplaylist = (GtkTreeView*) lookup_widget( GTK_WIDGET(button), "tvPlaylist"); p_tvplaylist = (GtkTreeView*) lookup_widget( GTK_WIDGET(button), "tvPlaylist");
......
...@@ -291,7 +291,7 @@ void MetaPanel::saveMeta() ...@@ -291,7 +291,7 @@ void MetaPanel::saveMeta()
if( p_mod ) if( p_mod )
module_Unneed( p_playlist, p_mod ); module_Unneed( p_playlist, p_mod );
PL_UNLOCK; PL_UNLOCK;
pl_Release( p_playlist ); pl_Release( p_intf );
/* Reset the status of the mode. No need to emit any signal because parent /* Reset the status of the mode. No need to emit any signal because parent
is the only caller */ is the only caller */
......
...@@ -366,7 +366,7 @@ void DialogsProvider::OnOpenFileSimple( int i_arg ) ...@@ -366,7 +366,7 @@ void DialogsProvider::OnOpenFileSimple( int i_arg )
PLAYLIST_APPEND | (i_arg?PLAYLIST_GO:0), PLAYLIST_END ); PLAYLIST_APPEND | (i_arg?PLAYLIST_GO:0), PLAYLIST_END );
} }
pl_Release( p_playlist ); pl_Release( p_intf );
} }
void DialogsProvider::OnOpenDirectory( int i_arg ) void DialogsProvider::OnOpenDirectory( int i_arg )
...@@ -431,7 +431,7 @@ void DialogsProvider::OnOpenDirectory( int i_arg ) ...@@ -431,7 +431,7 @@ void DialogsProvider::OnOpenDirectory( int i_arg )
error: error:
if( p_malloc) p_malloc->Release(); if( p_malloc) p_malloc->Release();
if( p_playlist ) pl_Release( p_playlist ); if( p_playlist ) pl_Release( p_intf );
#ifdef UNDER_CE #ifdef UNDER_CE
FreeLibrary( ceshell_dll ); FreeLibrary( ceshell_dll );
......
...@@ -652,7 +652,7 @@ void Interface::OnPlayStream( void ) ...@@ -652,7 +652,7 @@ void Interface::OnPlayStream( void )
/* No stream was playing, start one */ /* No stream was playing, start one */
playlist_Play( p_playlist ); playlist_Play( p_playlist );
TogglePlayButton( PLAYING_S ); TogglePlayButton( PLAYING_S );
pl_Release( p_playlist ); pl_Release( p_intf );
return; return;
} }
...@@ -678,7 +678,7 @@ void Interface::OnPlayStream( void ) ...@@ -678,7 +678,7 @@ void Interface::OnPlayStream( void )
/* If the playlist is empty, open a file requester instead */ /* If the playlist is empty, open a file requester instead */
OnShowDialog( ID_FILE_QUICKOPEN ); OnShowDialog( ID_FILE_QUICKOPEN );
} }
pl_Release( p_playlist ); pl_Release( p_intf );
} }
void Interface::TogglePlayButton( int i_playing_status ) void Interface::TogglePlayButton( int i_playing_status )
...@@ -815,7 +815,7 @@ void Interface::OnStopStream( void ) ...@@ -815,7 +815,7 @@ void Interface::OnStopStream( void )
playlist_Stop( p_playlist ); playlist_Stop( p_playlist );
TogglePlayButton( PAUSE_S ); TogglePlayButton( PAUSE_S );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
void Interface::OnPrevStream( void ) void Interface::OnPrevStream( void )
...@@ -824,7 +824,7 @@ void Interface::OnPrevStream( void ) ...@@ -824,7 +824,7 @@ void Interface::OnPrevStream( void )
if( p_playlist == NULL ) return; if( p_playlist == NULL ) return;
playlist_Prev( p_playlist ); playlist_Prev( p_playlist );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
void Interface::OnNextStream( void ) void Interface::OnNextStream( void )
...@@ -833,7 +833,7 @@ void Interface::OnNextStream( void ) ...@@ -833,7 +833,7 @@ void Interface::OnNextStream( void )
if( p_playlist == NULL ) return; if( p_playlist == NULL ) return;
playlist_Next( p_playlist ); playlist_Next( p_playlist );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
void Interface::OnSlowStream( void ) void Interface::OnSlowStream( void )
......
...@@ -273,7 +273,7 @@ void ItemInfoDialog::OnOk() ...@@ -273,7 +273,7 @@ void ItemInfoDialog::OnOk()
if( p_playlist != NULL ) if( p_playlist != NULL )
{ {
b_state = SendMessage( enabled_checkbox, BM_GETCHECK, 0, 0 ); b_state = SendMessage( enabled_checkbox, BM_GETCHECK, 0, 0 );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
p_item->b_enabled = (b_state & BST_CHECKED) ? true : false ; p_item->b_enabled = (b_state & BST_CHECKED) ? true : false ;
......
...@@ -227,7 +227,7 @@ void PopupMenu( intf_thread_t *p_intf, HWND p_parent, POINT point ) ...@@ -227,7 +227,7 @@ void PopupMenu( intf_thread_t *p_intf, HWND p_parent, POINT point )
AppendMenu( hmenu, MF_SEPARATOR, 0, _T("") ); AppendMenu( hmenu, MF_SEPARATOR, 0, _T("") );
AppendMenu( hmenu, MF_STRING, PlayStream_Event, _T("Play") ); AppendMenu( hmenu, MF_STRING, PlayStream_Event, _T("Play") );
} }
if( p_playlist ) pl_Release( p_playlist ); if( p_playlist ) pl_Release( p_intf );
} }
AppendMenu( hmenu, MF_POPUP|MF_STRING, (UINT)MiscMenu( p_intf ), AppendMenu( hmenu, MF_POPUP|MF_STRING, (UINT)MiscMenu( p_intf ),
......
...@@ -655,7 +655,7 @@ void OpenDialog::OnOk() ...@@ -655,7 +655,7 @@ void OpenDialog::OnOk()
free( pp_args[i_args] ); free( pp_args[i_args] );
if( !i_args ) free( pp_args ); if( !i_args ) free( pp_args );
} }
pl_Release( p_playlist ); pl_Release( p_intf );
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -303,7 +303,7 @@ LRESULT Playlist::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) ...@@ -303,7 +303,7 @@ LRESULT Playlist::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
bState = val.b_bool ? TBSTATE_CHECKED : 0; bState = val.b_bool ? TBSTATE_CHECKED : 0;
SendMessage( hwndTB, TB_SETSTATE, Repeat_Event, SendMessage( hwndTB, TB_SETSTATE, Repeat_Event,
MAKELONG(bState | TBSTATE_ENABLED, 0) ); MAKELONG(bState | TBSTATE_ENABLED, 0) );
pl_Release( p_playlist ); pl_Release( p_intf );
GetClientRect( hwnd, &rect ); GetClientRect( hwnd, &rect );
hListView = CreateWindow( WC_LISTVIEW, NULL, WS_VISIBLE | WS_CHILD | hListView = CreateWindow( WC_LISTVIEW, NULL, WS_VISIBLE | WS_CHILD |
...@@ -521,7 +521,7 @@ LRESULT Playlist::ProcessCustomDraw( LPARAM lParam ) ...@@ -521,7 +521,7 @@ LRESULT Playlist::ProcessCustomDraw( LPARAM lParam )
if( (int)lplvcd->nmcd.dwItemSpec == p_playlist->i_index ) if( (int)lplvcd->nmcd.dwItemSpec == p_playlist->i_index )
{ {
lplvcd->clrText = RGB(255,0,0); lplvcd->clrText = RGB(255,0,0);
pl_Release( p_playlist ); pl_Release( p_intf );
return CDRF_NEWFONT; return CDRF_NEWFONT;
} }
...@@ -529,16 +529,16 @@ LRESULT Playlist::ProcessCustomDraw( LPARAM lParam ) ...@@ -529,16 +529,16 @@ LRESULT Playlist::ProcessCustomDraw( LPARAM lParam )
(int)lplvcd->nmcd.dwItemSpec ); (int)lplvcd->nmcd.dwItemSpec );
if( !p_item ) if( !p_item )
{ {
pl_Release( p_playlist ); pl_Release( p_intf );
return CDRF_DODEFAULT; return CDRF_DODEFAULT;
} }
if( p_item->b_enabled == false ) if( p_item->b_enabled == false )
{ {
lplvcd->clrText = RGB(192,192,192); lplvcd->clrText = RGB(192,192,192);
pl_Release( p_playlist ); pl_Release( p_intf );
return CDRF_NEWFONT; return CDRF_NEWFONT;
} }
pl_Release( p_playlist ); pl_Release( p_intf );
} }
return CDRF_DODEFAULT; return CDRF_DODEFAULT;
...@@ -604,7 +604,7 @@ void Playlist::UpdatePlaylist() ...@@ -604,7 +604,7 @@ void Playlist::UpdatePlaylist()
} }
vlc_object_unlock( p_playlist ); vlc_object_unlock( p_playlist );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
/********************************************************************** /**********************************************************************
...@@ -645,7 +645,7 @@ void Playlist::Rebuild() ...@@ -645,7 +645,7 @@ void Playlist::Rebuild()
ListView_SetItemState( hListView, i_focused, LVIS_FOCUSED, ListView_SetItemState( hListView, i_focused, LVIS_FOCUSED,
LVIS_STATEIMAGEMASK ); LVIS_STATEIMAGEMASK );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
/********************************************************************** /**********************************************************************
...@@ -661,7 +661,7 @@ void Playlist::UpdateItem( int i ) ...@@ -661,7 +661,7 @@ void Playlist::UpdateItem( int i )
if( !p_item ) if( !p_item )
{ {
pl_Release(p_playlist); pl_Release( p_intf );
return; return;
} }
...@@ -677,7 +677,7 @@ void Playlist::UpdateItem( int i ) ...@@ -677,7 +677,7 @@ void Playlist::UpdateItem( int i )
ListView_SetItemText( hListView, i, 3, _FROMMB(psz_duration) ); ListView_SetItemText( hListView, i, 3, _FROMMB(psz_duration) );
pl_Release(p_playlist); pl_Release( p_intf );
} }
/********************************************************************** /**********************************************************************
...@@ -691,7 +691,7 @@ void Playlist::DeleteItem( int item ) ...@@ -691,7 +691,7 @@ void Playlist::DeleteItem( int item )
playlist_Delete( p_playlist, item ); playlist_Delete( p_playlist, item );
ListView_DeleteItem( hListView, item ); ListView_DeleteItem( hListView, item );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
/********************************************************************** /**********************************************************************
...@@ -708,7 +708,7 @@ static void OnOpenCB( intf_dialog_args_t *p_arg ) ...@@ -708,7 +708,7 @@ static void OnOpenCB( intf_dialog_args_t *p_arg )
if( p_playlist ) if( p_playlist )
{ {
playlist_Import( p_playlist, p_arg->psz_results[0] ); playlist_Import( p_playlist, p_arg->psz_results[0] );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
} }
} }
...@@ -747,7 +747,7 @@ static void OnSaveCB( intf_dialog_args_t *p_arg ) ...@@ -747,7 +747,7 @@ static void OnSaveCB( intf_dialog_args_t *p_arg )
else psz_export = "export-m3u"; else psz_export = "export-m3u";
playlist_Export( p_playlist, p_arg->psz_results[0], psz_export ); playlist_Export( p_playlist, p_arg->psz_results[0], psz_export );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
} }
} }
...@@ -814,7 +814,7 @@ void Playlist::OnEnableSelection() ...@@ -814,7 +814,7 @@ void Playlist::OnEnableSelection()
UpdateItem( item ); UpdateItem( item );
} }
} }
pl_Release( p_playlist); pl_Release( p_intf );
} }
void Playlist::OnDisableSelection() void Playlist::OnDisableSelection()
...@@ -834,7 +834,7 @@ void Playlist::OnDisableSelection() ...@@ -834,7 +834,7 @@ void Playlist::OnDisableSelection()
UpdateItem( item ); UpdateItem( item );
} }
} }
pl_Release( p_playlist); pl_Release( p_intf );
} }
void Playlist::OnSelectAll() void Playlist::OnSelectAll()
...@@ -853,7 +853,7 @@ void Playlist::OnActivateItem( int i_item ) ...@@ -853,7 +853,7 @@ void Playlist::OnActivateItem( int i_item )
playlist_Goto( p_playlist, i_item ); playlist_Goto( p_playlist, i_item );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
void Playlist::ShowInfos( HWND hwnd, int i_item ) void Playlist::ShowInfos( HWND hwnd, int i_item )
...@@ -874,7 +874,7 @@ void Playlist::ShowInfos( HWND hwnd, int i_item ) ...@@ -874,7 +874,7 @@ void Playlist::ShowInfos( HWND hwnd, int i_item )
delete iteminfo_dialog; delete iteminfo_dialog;
} }
pl_Release( p_playlist ); pl_Release( p_intf );
} }
/******************************************************************** /********************************************************************
...@@ -903,7 +903,7 @@ void Playlist::OnUp() ...@@ -903,7 +903,7 @@ void Playlist::OnUp()
LVIS_STATEIMAGEMASK ); LVIS_STATEIMAGEMASK );
} }
} }
pl_Release( p_playlist ); pl_Release( p_intf );
return; return;
} }
...@@ -923,7 +923,7 @@ void Playlist::OnDown() ...@@ -923,7 +923,7 @@ void Playlist::OnDown()
ListView_SetItemState( hListView, i_item + 1, LVIS_FOCUSED, ListView_SetItemState( hListView, i_item + 1, LVIS_FOCUSED,
LVIS_STATEIMAGEMASK ); LVIS_STATEIMAGEMASK );
} }
pl_Release( p_playlist ); pl_Release( p_intf );
return; return;
} }
...@@ -941,7 +941,7 @@ void Playlist::OnRandom() ...@@ -941,7 +941,7 @@ void Playlist::OnRandom()
if( p_playlist == NULL ) return; if( p_playlist == NULL ) return;
var_Set( p_playlist , "random", val ); var_Set( p_playlist , "random", val );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
void Playlist::OnLoop () void Playlist::OnLoop ()
...@@ -954,7 +954,7 @@ void Playlist::OnLoop () ...@@ -954,7 +954,7 @@ void Playlist::OnLoop ()
if( p_playlist == NULL ) return; if( p_playlist == NULL ) return;
var_Set( p_playlist , "loop", val ); var_Set( p_playlist , "loop", val );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
void Playlist::OnRepeat () void Playlist::OnRepeat ()
...@@ -967,7 +967,7 @@ void Playlist::OnRepeat () ...@@ -967,7 +967,7 @@ void Playlist::OnRepeat ()
if( p_playlist == NULL ) return; if( p_playlist == NULL ) return;
var_Set( p_playlist , "repeat", val ); var_Set( p_playlist , "repeat", val );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
/******************************************************************** /********************************************************************
...@@ -997,7 +997,7 @@ void Playlist::OnSort( UINT event ) ...@@ -997,7 +997,7 @@ void Playlist::OnSort( UINT event )
break; break;
} }
pl_Release( p_playlist ); pl_Release( p_intf );
b_need_update = true; b_need_update = true;
...@@ -1039,7 +1039,7 @@ void Playlist::OnColSelect( int iSubItem ) ...@@ -1039,7 +1039,7 @@ void Playlist::OnColSelect( int iSubItem )
break; break;
} }
pl_Release( p_playlist ); pl_Release( p_intf );
b_need_update = true; b_need_update = true;
...@@ -1062,7 +1062,7 @@ void Playlist::OnPopupPlay() ...@@ -1062,7 +1062,7 @@ void Playlist::OnPopupPlay()
playlist_Goto( p_playlist, i_popup_item ); playlist_Goto( p_playlist, i_popup_item );
} }
pl_Release( p_playlist ); pl_Release( p_intf );
} }
void Playlist::OnPopupDel() void Playlist::OnPopupDel()
...@@ -1094,7 +1094,7 @@ void Playlist::OnPopupEna() ...@@ -1094,7 +1094,7 @@ void Playlist::OnPopupEna()
playlist_Enable( p_playlist, p_item ); playlist_Enable( p_playlist, p_item );
} }
pl_Release( p_playlist); pl_Release( p_intf );
UpdateItem( i_popup_item ); UpdateItem( i_popup_item );
} }
......
...@@ -56,7 +56,7 @@ Timer::Timer( intf_thread_t *_p_intf, HWND hwnd, Interface *_p_main_interface) ...@@ -56,7 +56,7 @@ Timer::Timer( intf_thread_t *_p_intf, HWND hwnd, Interface *_p_main_interface)
if( p_playlist != NULL ) if( p_playlist != NULL )
{ {
var_AddCallback( p_playlist, "intf-popupmenu", PopupMenuCB, p_intf ); var_AddCallback( p_playlist, "intf-popupmenu", PopupMenuCB, p_intf );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
SetTimer( hwnd, 1, 200 /*milliseconds*/, NULL ); SetTimer( hwnd, 1, 200 /*milliseconds*/, NULL );
...@@ -69,7 +69,7 @@ Timer::~Timer() ...@@ -69,7 +69,7 @@ Timer::~Timer()
if( p_playlist != NULL ) if( p_playlist != NULL )
{ {
var_DelCallback( p_playlist, "intf-popupmenu", PopupMenuCB, p_intf ); var_DelCallback( p_playlist, "intf-popupmenu", PopupMenuCB, p_intf );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
} }
......
...@@ -471,7 +471,7 @@ void DialogsProvider::OnOpenFileSimple( wxCommandEvent& event ) ...@@ -471,7 +471,7 @@ void DialogsProvider::OnOpenFileSimple( wxCommandEvent& event )
wxLocaleFree( psz_utf8 ); wxLocaleFree( psz_utf8 );
} }
} }
pl_Release( p_playlist ); pl_Release( p_intf );
} }
void DialogsProvider::OnOpenDirectory( wxCommandEvent& event ) void DialogsProvider::OnOpenDirectory( wxCommandEvent& event )
...@@ -494,7 +494,7 @@ void DialogsProvider::OnOpenDirectory( wxCommandEvent& event ) ...@@ -494,7 +494,7 @@ void DialogsProvider::OnOpenDirectory( wxCommandEvent& event )
PLAYLIST_END, true, false ); PLAYLIST_END, true, false );
wxLocaleFree( psz_utf8 ); wxLocaleFree( psz_utf8 );
} }
pl_Release( p_playlist ); pl_Release( p_intf );
} }
void DialogsProvider::OnOpenFile( wxCommandEvent& event ) void DialogsProvider::OnOpenFile( wxCommandEvent& event )
......
...@@ -210,7 +210,7 @@ BookmarksDialog::BookmarksDialog( intf_thread_t *_p_intf, wxWindow *p_parent ) ...@@ -210,7 +210,7 @@ BookmarksDialog::BookmarksDialog( intf_thread_t *_p_intf, wxWindow *p_parent )
/* Some global changes happened -> Rebuild all */ /* Some global changes happened -> Rebuild all */
var_AddCallback( p_playlist, "playlist-current", var_AddCallback( p_playlist, "playlist-current",
PlaylistChanged, this ); PlaylistChanged, this );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
} }
...@@ -221,7 +221,7 @@ BookmarksDialog::~BookmarksDialog() ...@@ -221,7 +221,7 @@ BookmarksDialog::~BookmarksDialog()
{ {
var_DelCallback( p_playlist, "playlist-current", var_DelCallback( p_playlist, "playlist-current",
PlaylistChanged, this ); PlaylistChanged, this );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
} }
......
...@@ -101,7 +101,7 @@ FileInfo::FileInfo( intf_thread_t *_p_intf, wxWindow *p_parent ): ...@@ -101,7 +101,7 @@ FileInfo::FileInfo( intf_thread_t *_p_intf, wxWindow *p_parent ):
if( p_playlist ) if( p_playlist )
{ {
var_AddCallback( p_playlist, "item-change", ItemChanged, this ); var_AddCallback( p_playlist, "item-change", ItemChanged, this );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
last_update = 0L; last_update = 0L;
...@@ -124,10 +124,10 @@ void FileInfo::Update() ...@@ -124,10 +124,10 @@ void FileInfo::Update()
advanced_info->Clear(); advanced_info->Clear();
if( b_stats ) if( b_stats )
stats_info->Clear(); stats_info->Clear();
pl_Release( p_playlist ); pl_Release( p_intf );
return; return;
} }
pl_Release( p_playlist ); pl_Release( p_intf );
vlc_object_yield( p_input ); vlc_object_yield( p_input );
vlc_mutex_lock( &input_GetItem(p_input)->lock ); vlc_mutex_lock( &input_GetItem(p_input)->lock );
...@@ -143,7 +143,7 @@ void FileInfo::Update() ...@@ -143,7 +143,7 @@ void FileInfo::Update()
vlc_mutex_unlock( &input_GetItem(p_input)->lock ); vlc_mutex_unlock( &input_GetItem(p_input)->lock );
vlc_object_release(p_input); vlc_object_release(p_input);
pl_Release( p_playlist ); pl_Release( p_intf );
b_need_update = false; b_need_update = false;
panel_sizer->Layout(); panel_sizer->Layout();
......
...@@ -1209,7 +1209,7 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) ) ...@@ -1209,7 +1209,7 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
PLAYLIST_END, true, pl_Unlocked ); PLAYLIST_END, true, pl_Unlocked );
vlc_gc_decref( p_input ); vlc_gc_decref( p_input );
} }
pl_Release( p_playlist ); pl_Release( p_intf );
Hide(); Hide();
......
...@@ -599,7 +599,7 @@ wizInputPage::wizInputPage( wxWizard *parent, wxWizardPage *prev, intf_thread_t ...@@ -599,7 +599,7 @@ wizInputPage::wizInputPage( wxWizard *parent, wxWizardPage *prev, intf_thread_t
{ {
input_radios[1]->Disable(); input_radios[1]->Disable();
} }
pl_Release( p_playlist ); pl_Release( p_intf );
} }
else else
{ {
...@@ -727,7 +727,7 @@ void wizInputPage::OnWizardPageChanging(wxWizardEvent& event) ...@@ -727,7 +727,7 @@ void wizInputPage::OnWizardPageChanging(wxWizardEvent& event)
} }
else else
event.Veto(); event.Veto();
pl_Release( p_playlist ); pl_Release( p_intf );
} }
else else
event.Veto(); event.Veto();
...@@ -1633,7 +1633,7 @@ void WizardDialog::Run() ...@@ -1633,7 +1633,7 @@ void WizardDialog::Run()
playlist_AddInput( p_playlist, p_input, playlist_AddInput( p_playlist, p_input,
PLAYLIST_GO, PLAYLIST_END, true, pl_Unlocked ); PLAYLIST_GO, PLAYLIST_END, true, pl_Unlocked );
vlc_gc_decref( p_input ); vlc_gc_decref( p_input );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
else else
{ {
......
...@@ -202,7 +202,7 @@ void InputManager::UpdateInput() ...@@ -202,7 +202,7 @@ void InputManager::UpdateInput()
if( p_intf->p_sys->p_input ) if( p_intf->p_sys->p_input )
vlc_object_yield( p_intf->p_sys->p_input ); vlc_object_yield( p_intf->p_sys->p_input );
UnlockPlaylist( p_intf->p_sys, p_playlist ); UnlockPlaylist( p_intf->p_sys, p_playlist );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
} }
......
...@@ -1089,7 +1089,7 @@ void Interface::PlayStream() ...@@ -1089,7 +1089,7 @@ void Interface::PlayStream()
{ {
/* No stream was playing, start one */ /* No stream was playing, start one */
playlist_Play( p_playlist ); playlist_Play( p_playlist );
pl_Release( p_playlist ); pl_Release( p_intf );
input_manager->Update(); input_manager->Update();
return; return;
} }
...@@ -1108,13 +1108,13 @@ void Interface::PlayStream() ...@@ -1108,13 +1108,13 @@ void Interface::PlayStream()
var_Set( p_input, "state", state ); var_Set( p_input, "state", state );
vlc_object_release( p_input ); vlc_object_release( p_input );
pl_Release( p_playlist ); pl_Release( p_intf );
input_manager->Update(); input_manager->Update();
} }
else else
{ {
/* If the playlist is empty, open a file requester instead */ /* If the playlist is empty, open a file requester instead */
pl_Release( p_playlist ); pl_Release( p_intf );
OnShowDialog( dummy ); OnShowDialog( dummy );
GetToolBar()->ToggleTool( PlayStream_Event, false ); GetToolBar()->ToggleTool( PlayStream_Event, false );
} }
...@@ -1133,7 +1133,7 @@ void Interface::StopStream() ...@@ -1133,7 +1133,7 @@ void Interface::StopStream()
} }
playlist_Stop( p_playlist ); playlist_Stop( p_playlist );
pl_Release( p_playlist ); pl_Release( p_intf );
input_manager->Update(); input_manager->Update();
} }
...@@ -1151,7 +1151,7 @@ void Interface::PrevStream() ...@@ -1151,7 +1151,7 @@ void Interface::PrevStream()
} }
playlist_Prev( p_playlist ); playlist_Prev( p_playlist );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
void Interface::OnNextStream( wxCommandEvent& WXUNUSED(event) ) void Interface::OnNextStream( wxCommandEvent& WXUNUSED(event) )
...@@ -1167,7 +1167,7 @@ void Interface::NextStream() ...@@ -1167,7 +1167,7 @@ void Interface::NextStream()
return; return;
} }
playlist_Next( p_playlist ); playlist_Next( p_playlist );
pl_Release( p_playlist ); pl_Release( p_intf );
} }
void Interface::OnSlowStream( wxCommandEvent& WXUNUSED(event) ) void Interface::OnSlowStream( wxCommandEvent& WXUNUSED(event) )
...@@ -1333,7 +1333,7 @@ bool DragAndDrop::OnDropFiles( wxCoord, wxCoord, ...@@ -1333,7 +1333,7 @@ bool DragAndDrop::OnDropFiles( wxCoord, wxCoord,
{ {
vlc_object_release( p_input ); vlc_object_release( p_input );
wxDnDLocaleFree( psz_utf8 ); wxDnDLocaleFree( psz_utf8 );
pl_Release( p_playlist ); pl_Release( p_intf );
return TRUE; return TRUE;
} }
vlc_object_release( p_input ); vlc_object_release( p_input );
...@@ -1351,7 +1351,7 @@ bool DragAndDrop::OnDropFiles( wxCoord, wxCoord, ...@@ -1351,7 +1351,7 @@ bool DragAndDrop::OnDropFiles( wxCoord, wxCoord,
wxDnDLocaleFree( psz_utf8 ); wxDnDLocaleFree( psz_utf8 );
} }
pl_Release( p_playlist ); pl_Release( p_intf );
return TRUE; return TRUE;
} }
......
...@@ -269,7 +269,7 @@ int IntfAutoMenuBuilder( intf_thread_t *p_intf, ArrayOfInts &ri_objects, ...@@ -269,7 +269,7 @@ int IntfAutoMenuBuilder( intf_thread_t *p_intf, ArrayOfInts &ri_objects,
popupmenu.InsertSeparator( 0 ); \ popupmenu.InsertSeparator( 0 ); \
popupmenu.Insert( 0, Play_Event, wxU(_("Play")) ); \ popupmenu.Insert( 0, Play_Event, wxU(_("Play")) ); \
} \ } \
if( p_playlist ) pl_Release( p_playlist ); \ if( p_playlist ) pl_Release( p_intf ); \
} \ } \
\ \
popupmenu.Append( MenuDummy_Event, wxU(_("Miscellaneous")), \ popupmenu.Append( MenuDummy_Event, wxU(_("Miscellaneous")), \
...@@ -296,7 +296,7 @@ void VideoPopupMenu( intf_thread_t *p_intf, wxWindow *p_parent, ...@@ -296,7 +296,7 @@ void VideoPopupMenu( intf_thread_t *p_intf, wxWindow *p_parent,
} }
vlc_object_release( p_input ); vlc_object_release( p_input );
} }
pl_Release( p_playlist ); pl_Release( p_intf );
CREATE_POPUP; CREATE_POPUP;
} }
...@@ -318,7 +318,7 @@ void AudioPopupMenu( intf_thread_t *p_intf, wxWindow *p_parent, ...@@ -318,7 +318,7 @@ void AudioPopupMenu( intf_thread_t *p_intf, wxWindow *p_parent,
} }
vlc_object_release( p_input ); vlc_object_release( p_input );
} }
pl_Release( p_playlist ); pl_Release( p_intf );
CREATE_POPUP; CREATE_POPUP;
} }
...@@ -347,7 +347,7 @@ void MiscPopupMenu( intf_thread_t *p_intf, wxWindow *p_parent, ...@@ -347,7 +347,7 @@ void MiscPopupMenu( intf_thread_t *p_intf, wxWindow *p_parent,
p_intf->p_sys->p_popup_menu = &popupmenu; p_intf->p_sys->p_popup_menu = &popupmenu;
p_parent->PopupMenu( &popupmenu, pos.x, pos.y ); p_parent->PopupMenu( &popupmenu, pos.x, pos.y );
p_intf->p_sys->p_popup_menu = NULL; p_intf->p_sys->p_popup_menu = NULL;
pl_Release( p_playlist ); pl_Release( p_intf );
} }
void PopupMenu( intf_thread_t *p_intf, wxWindow *p_parent, void PopupMenu( intf_thread_t *p_intf, wxWindow *p_parent,
...@@ -403,7 +403,7 @@ void PopupMenu( intf_thread_t *p_intf, wxWindow *p_parent, ...@@ -403,7 +403,7 @@ void PopupMenu( intf_thread_t *p_intf, wxWindow *p_parent,
p_intf->p_sys->p_popup_menu = &popupmenu; p_intf->p_sys->p_popup_menu = &popupmenu;
p_parent->PopupMenu( &popupmenu, pos.x, pos.y ); p_parent->PopupMenu( &popupmenu, pos.x, pos.y );
p_intf->p_sys->p_popup_menu = NULL; p_intf->p_sys->p_popup_menu = NULL;
pl_Release( p_playlist ); pl_Release( p_intf );
} }
/***************************************************************************** /*****************************************************************************
...@@ -967,7 +967,7 @@ void MenuEvtHandler::OnMenuEvent( wxCommandEvent& event ) ...@@ -967,7 +967,7 @@ void MenuEvtHandler::OnMenuEvent( wxCommandEvent& event )
playlist_Next( p_playlist ); playlist_Next( p_playlist );
break; break;
} }
pl_Release( p_playlist ); pl_Release( p_intf );
return; return;
} }
......
...@@ -187,7 +187,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -187,7 +187,7 @@ static int Open( vlc_object_t *p_this )
PL_LOCK; PL_LOCK;
var_AddCallback( p_playlist, "playlist-current", ItemChange, p_intf ); var_AddCallback( p_playlist, "playlist-current", ItemChange, p_intf );
PL_UNLOCK; PL_UNLOCK;
pl_Release( p_playlist ); pl_Release( p_intf );
p_intf->pf_run = Run; p_intf->pf_run = Run;
...@@ -221,7 +221,7 @@ static void Close( vlc_object_t *p_this ) ...@@ -221,7 +221,7 @@ static void Close( vlc_object_t *p_this )
} }
PL_UNLOCK; PL_UNLOCK;
pl_Release( p_playlist ); pl_Release( p_intf );
p_intf->b_dead = true; p_intf->b_dead = true;
/* we lock the mutex in case p_sys is being accessed from a callback */ /* we lock the mutex in case p_sys is being accessed from a callback */
...@@ -520,13 +520,13 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, ...@@ -520,13 +520,13 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
if( !p_input || p_input->b_dead ) if( !p_input || p_input->b_dead )
{ {
PL_UNLOCK; PL_UNLOCK;
pl_Release( p_playlist ); pl_Release( p_intf );
return VLC_SUCCESS; return VLC_SUCCESS;
} }
vlc_object_yield( p_input ); vlc_object_yield( p_input );
PL_UNLOCK; PL_UNLOCK;
pl_Release( p_playlist ); pl_Release( p_intf );
p_item = input_GetItem( p_input ); p_item = input_GetItem( p_input );
if( !p_item ) if( !p_item )
...@@ -927,13 +927,13 @@ static int ReadMetaData( intf_thread_t *p_this ) ...@@ -927,13 +927,13 @@ static int ReadMetaData( intf_thread_t *p_this )
if( !p_input ) if( !p_input )
{ {
PL_UNLOCK; PL_UNLOCK;
pl_Release( p_playlist ); pl_Release( p_this );
return( VLC_SUCCESS ); return( VLC_SUCCESS );
} }
vlc_object_yield( p_input ); vlc_object_yield( p_input );
PL_UNLOCK; PL_UNLOCK;
pl_Release( p_playlist ); pl_Release( p_this );
p_item = input_GetItem( p_input ); p_item = input_GetItem( p_input );
if( !p_item ) if( !p_item )
......
...@@ -162,7 +162,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, ...@@ -162,7 +162,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
playlist_t *p_playlist = pl_Yield( p_this ); playlist_t *p_playlist = pl_Yield( p_this );
p_input = p_playlist->p_input; p_input = p_playlist->p_input;
pl_Release( p_playlist ); pl_Release( p_this );
if( !p_input ) return VLC_SUCCESS; if( !p_input ) return VLC_SUCCESS;
vlc_object_yield( p_input ); vlc_object_yield( p_input );
......
...@@ -124,7 +124,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, ...@@ -124,7 +124,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
playlist_t *p_playlist = pl_Yield( p_this ); playlist_t *p_playlist = pl_Yield( p_this );
p_input = p_playlist->p_input; p_input = p_playlist->p_input;
pl_Release( p_playlist ); pl_Release( p_this );
if( !p_input ) return VLC_SUCCESS; if( !p_input ) return VLC_SUCCESS;
vlc_object_yield( p_input ); vlc_object_yield( p_input );
......
...@@ -150,7 +150,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, ...@@ -150,7 +150,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
intf_sys_t *p_sys = p_intf->p_sys; intf_sys_t *p_sys = p_intf->p_sys;
p_input = p_playlist->p_input; p_input = p_playlist->p_input;
pl_Release( p_playlist ); pl_Release( p_this );
if( !p_input ) return VLC_SUCCESS; if( !p_input ) return VLC_SUCCESS;
vlc_object_yield( p_input ); vlc_object_yield( p_input );
......
...@@ -220,7 +220,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -220,7 +220,7 @@ static void Run( intf_thread_t *p_intf )
if( playlist_IsEmpty( p_playlist ) ) if( playlist_IsEmpty( p_playlist ) )
{ {
pl_Release( p_playlist ); pl_Release( p_intf );
continue; continue;
} }
free( psz_display ); free( psz_display );
...@@ -228,19 +228,19 @@ static void Run( intf_thread_t *p_intf ) ...@@ -228,19 +228,19 @@ static void Run( intf_thread_t *p_intf )
if( p_playlist->status.i_status == PLAYLIST_STOPPED ) if( p_playlist->status.i_status == PLAYLIST_STOPPED )
{ {
psz_display = strdup(_("Stop")); psz_display = strdup(_("Stop"));
pl_Release( p_playlist ); pl_Release( p_intf );
} }
else if( p_playlist->status.i_status == PLAYLIST_PAUSED ) else if( p_playlist->status.i_status == PLAYLIST_PAUSED )
{ {
psz_display = strdup(_("Pause")); psz_display = strdup(_("Pause"));
pl_Release( p_playlist ); pl_Release( p_intf );
} }
else else
{ {
p_item = p_playlist->status.p_item; p_item = p_playlist->status.p_item;
p_input = p_item->p_input; p_input = p_item->p_input;
pl_Release( p_playlist ); pl_Release( p_intf );
if( !p_item ) if( !p_item )
continue; continue;
......
...@@ -2131,7 +2131,7 @@ static int WallpaperCallback( vlc_object_t *p_this, char const *psz_cmd, ...@@ -2131,7 +2131,7 @@ static int WallpaperCallback( vlc_object_t *p_this, char const *psz_cmd,
* restarted */ * restarted */
var_Create( p_playlist, "directx-wallpaper", VLC_VAR_BOOL ); var_Create( p_playlist, "directx-wallpaper", VLC_VAR_BOOL );
var_Set( p_playlist, "directx-wallpaper", newval ); var_Set( p_playlist, "directx-wallpaper", newval );
pl_Release( p_playlist ); pl_Release( p_vout );
} }
p_vout->p_sys->i_changes |= DX_WALLPAPER_CHANGE; p_vout->p_sys->i_changes |= DX_WALLPAPER_CHANGE;
......
...@@ -865,7 +865,7 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message, ...@@ -865,7 +865,7 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
if( p_playlist ) if( p_playlist )
{ {
playlist_Stop( p_playlist ); playlist_Stop( p_playlist );
pl_Release( p_playlist ); pl_Release( p_vout );
} }
return 0; return 0;
} }
......
...@@ -517,7 +517,7 @@ static int Manage( vout_thread_t *p_vout ) ...@@ -517,7 +517,7 @@ static int Manage( vout_thread_t *p_vout )
if( p_playlist != NULL ) if( p_playlist != NULL )
{ {
playlist_Stop( p_playlist ); playlist_Stop( p_playlist );
pl_Release( p_playlist ); pl_Release( p_vout );
} }
#else #else
#warning FIXME FIXME ? #warning FIXME FIXME ?
......
...@@ -1465,7 +1465,7 @@ static int ManageVideo( vout_thread_t *p_vout ) ...@@ -1465,7 +1465,7 @@ static int ManageVideo( vout_thread_t *p_vout )
if( p_playlist != NULL ) if( p_playlist != NULL )
{ {
playlist_Stop( p_playlist ); playlist_Stop( p_playlist );
pl_Release( p_playlist ); pl_Release( p_vout );
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment