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

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