Commit 4e318891 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt, playlist: fix a deadlock (#3052)

input_Read doesn't seem a good idea when input is a dvd://
Maybe use a playlist_PreparseEnqueue ?
parent f7a79bf1
...@@ -929,6 +929,8 @@ bool PLModel::popup( const QModelIndex & index, const QPoint &point, const QMode ...@@ -929,6 +929,8 @@ bool PLModel::popup( const QModelIndex & index, const QPoint &point, const QMode
} }
menu.addSeparator(); menu.addSeparator();
} }
vlc_gc_decref( p_input );
if( canEdit() ) if( canEdit() )
{ {
QIcon addIcon( ":/buttons/playlist/playlist_add" ); QIcon addIcon( ":/buttons/playlist/playlist_add" );
...@@ -957,8 +959,7 @@ bool PLModel::popup( const QModelIndex & index, const QPoint &point, const QMode ...@@ -957,8 +959,7 @@ bool PLModel::popup( const QModelIndex & index, const QPoint &point, const QMode
{ {
sortingMenu = new QMenu( qtr( "Sort by" ) ); sortingMenu = new QMenu( qtr( "Sort by" ) );
sortingMapper = new QSignalMapper( this ); sortingMapper = new QSignalMapper( this );
int i, j; for( int i = 1, j = 1; i < COLUMN_END; i <<= 1, j++ )
for( i = 1, j = 1; i < COLUMN_END; i <<= 1, j++ )
{ {
if( i == COLUMN_NUMBER ) continue; if( i == COLUMN_NUMBER ) continue;
QMenu *m = sortingMenu->addMenu( qfu( psz_column_title( i ) ) ); QMenu *m = sortingMenu->addMenu( qfu( psz_column_title( i ) ) );
...@@ -973,7 +974,6 @@ bool PLModel::popup( const QModelIndex & index, const QPoint &point, const QMode ...@@ -973,7 +974,6 @@ bool PLModel::popup( const QModelIndex & index, const QPoint &point, const QMode
} }
menu.addMenu( sortingMenu ); menu.addMenu( sortingMenu );
} }
vlc_gc_decref( p_input );
if( !menu.isEmpty() ) if( !menu.isEmpty() )
{ {
......
...@@ -515,10 +515,8 @@ static void openDirectory( intf_thread_t *p_intf, bool pl, bool go ) ...@@ -515,10 +515,8 @@ static void openDirectory( intf_thread_t *p_intf, bool pl, bool go )
/* FIXME: playlist_AddInput() can fail */ /* FIXME: playlist_AddInput() can fail */
playlist_AddInput( THEPL, p_input, playlist_AddInput( THEPL, p_input,
go ? ( PLAYLIST_APPEND | PLAYLIST_GO ) : PLAYLIST_APPEND, go ? ( PLAYLIST_APPEND | PLAYLIST_GO ) : PLAYLIST_APPEND,
PLAYLIST_END, pl, pl_Unlocked ); PLAYLIST_END, pl, pl_Unlocked );
if( !go )
input_Read( THEPL, p_input );
vlc_gc_decref( p_input ); vlc_gc_decref( p_input );
} }
......
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