Commit 8f529eae authored by Jean-Philippe Andre's avatar Jean-Philippe Andre

Do not read directory twice. This solves #1761 but this may not be the real...

Do not read directory twice. This solves #1761 but this may not be the real solution. See the origin of the segfault in my comments on the trac.
parent 622c1340
...@@ -422,11 +422,17 @@ static void openDirectory( intf_thread_t *p_intf, bool pl, bool go ) ...@@ -422,11 +422,17 @@ static void openDirectory( intf_thread_t *p_intf, bool pl, bool go )
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 );
input_Read( THEPL, p_input, false ); if( !go )
input_Read( THEPL, p_input, false );
vlc_gc_decref( p_input ); vlc_gc_decref( p_input );
} }
} }
void DialogsProvider::PLOpenDir()
{
openDirectory( p_intf, true, true );
}
void DialogsProvider::PLAppendDir() void DialogsProvider::PLAppendDir()
{ {
openDirectory( p_intf, true, false ); openDirectory( p_intf, true, false );
......
...@@ -166,6 +166,7 @@ public slots: ...@@ -166,6 +166,7 @@ public slots:
void PLAppendDialog(); void PLAppendDialog();
void MLAppendDialog(); void MLAppendDialog();
void PLOpenDir();
void PLAppendDir(); void PLAppendDir();
void MLAppendDir(); void MLAppendDir();
......
...@@ -289,7 +289,7 @@ QMenu *QVLCMenu::FileMenu() ...@@ -289,7 +289,7 @@ QMenu *QVLCMenu::FileMenu()
addDPStaticEntry( menu, qtr( "&Open File..." ), "", addDPStaticEntry( menu, qtr( "&Open File..." ), "",
":/file-asym", SLOT( openFileDialog() ), "Ctrl+O" ); ":/file-asym", SLOT( openFileDialog() ), "Ctrl+O" );
addDPStaticEntry( menu, qtr( I_OPEN_FOLDER ), "", addDPStaticEntry( menu, qtr( I_OPEN_FOLDER ), "",
":/folder-grey", SLOT( PLAppendDir() ), "Ctrl+F" ); ":/folder-grey", SLOT( PLOpenDir() ), "Ctrl+F" );
addDPStaticEntry( menu, qtr( "Open &Disc..." ), "", addDPStaticEntry( menu, qtr( "Open &Disc..." ), "",
":/disc", SLOT( openDiscDialog() ), "Ctrl+D" ); ":/disc", SLOT( openDiscDialog() ), "Ctrl+D" );
addDPStaticEntry( menu, qtr( "Open &Network..." ), "", addDPStaticEntry( menu, qtr( "Open &Network..." ), "",
...@@ -677,7 +677,7 @@ void QVLCMenu::PopupMenuStaticEntries( intf_thread_t *p_intf, QMenu *menu ) ...@@ -677,7 +677,7 @@ void QVLCMenu::PopupMenuStaticEntries( intf_thread_t *p_intf, QMenu *menu )
addDPStaticEntry( openmenu, qtr( "&Open File..." ), "", addDPStaticEntry( openmenu, qtr( "&Open File..." ), "",
":/file-asym", SLOT( openFileDialog() ) ); ":/file-asym", SLOT( openFileDialog() ) );
addDPStaticEntry( openmenu, qtr( I_OPEN_FOLDER ), "", addDPStaticEntry( openmenu, qtr( I_OPEN_FOLDER ), "",
":/folder-grey", SLOT( PLAppendDir() ) ); ":/folder-grey", SLOT( PLOpenDir() ) );
addDPStaticEntry( openmenu, qtr( "Open &Disc..." ), "", addDPStaticEntry( openmenu, qtr( "Open &Disc..." ), "",
":/disc", SLOT( openDiscDialog() ) ); ":/disc", SLOT( openDiscDialog() ) );
addDPStaticEntry( openmenu, qtr( "Open &Network..." ), "", addDPStaticEntry( openmenu, qtr( "Open &Network..." ), "",
......
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