Commit 450a2fb5 authored by Clément Stenac's avatar Clément Stenac

Fix CDDA and a corner-case in playlist handling

parent 05b21e96
...@@ -5494,6 +5494,7 @@ AC_CONFIG_FILES([ ...@@ -5494,6 +5494,7 @@ AC_CONFIG_FILES([
modules/gui/pda/Makefile modules/gui/pda/Makefile
modules/gui/macosx/Makefile modules/gui/macosx/Makefile
modules/gui/qnx/Makefile modules/gui/qnx/Makefile
modules/gui/qt4/Makefile
modules/gui/skins2/Makefile modules/gui/skins2/Makefile
modules/gui/wxwidgets/Makefile modules/gui/wxwidgets/Makefile
modules/gui/wince/Makefile modules/gui/wince/Makefile
......
...@@ -291,8 +291,9 @@ static int Open( vlc_object_t *p_this ) ...@@ -291,8 +291,9 @@ static int Open( vlc_object_t *p_this )
if( b_play ) if( b_play )
{ {
playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, 1242,
p_playlist->status.p_item, NULL ); p_playlist->request.p_node, NULL );
// playlist_Play( p_playlist );
} }
if( p_playlist ) vlc_object_release( p_playlist ); if( p_playlist ) vlc_object_release( p_playlist );
...@@ -535,6 +536,7 @@ static int GetTracks( access_t *p_access, vlc_bool_t b_separate, ...@@ -535,6 +536,7 @@ static int GetTracks( access_t *p_access, vlc_bool_t b_separate,
access_sys_t *p_sys = p_access->p_sys; access_sys_t *p_sys = p_access->p_sys;
int i; int i;
input_item_t *p_input_item; input_item_t *p_input_item;
playlist_item_t *p_item_in_category;
char *psz_name; char *psz_name;
p_sys->i_titles = ioctl_GetTracksMap( VLC_OBJECT(p_access), p_sys->i_titles = ioctl_GetTracksMap( VLC_OBJECT(p_access),
p_sys->vcddev, &p_sys->p_sectors ); p_sys->vcddev, &p_sys->p_sectors );
...@@ -551,10 +553,7 @@ static int GetTracks( access_t *p_access, vlc_bool_t b_separate, ...@@ -551,10 +553,7 @@ static int GetTracks( access_t *p_access, vlc_bool_t b_separate,
if( b_separate ) if( b_separate )
{ {
if( p_parent->i_children == -1 ) p_item_in_category = playlist_LockItemToNode( p_playlist, p_parent );
{
playlist_LockItemToNode( p_playlist, p_parent );
}
psz_name = strdup( "Audio CD" ); psz_name = strdup( "Audio CD" );
vlc_mutex_lock( &p_playlist->object_lock ); vlc_mutex_lock( &p_playlist->object_lock );
playlist_ItemSetName( p_parent, psz_name ); playlist_ItemSetName( p_parent, psz_name );
...@@ -648,8 +647,8 @@ static int GetTracks( access_t *p_access, vlc_bool_t b_separate, ...@@ -648,8 +647,8 @@ static int GetTracks( access_t *p_access, vlc_bool_t b_separate,
} }
} }
#endif #endif
playlist_BothAddInput( p_playlist, p_input_item, p_parent, playlist_AddWhereverNeeded( p_playlist, p_input_item, p_parent,
PLAYLIST_APPEND, PLAYLIST_END ); p_item_in_category, VLC_FALSE, PLAYLIST_APPEND );
free( psz_uri ); free( psz_opt ); free( psz_name ); free( psz_uri ); free( psz_opt ); free( psz_name );
} }
} }
......
...@@ -112,12 +112,16 @@ int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args ) ...@@ -112,12 +112,16 @@ int PlaylistVAControl( playlist_t * p_playlist, int i_query, va_list args )
p_node = (playlist_item_t *)va_arg( args, playlist_item_t * ); p_node = (playlist_item_t *)va_arg( args, playlist_item_t * );
p_item = (playlist_item_t *)va_arg( args, playlist_item_t * ); p_item = (playlist_item_t *)va_arg( args, playlist_item_t * );
if ( p_node == NULL ) if ( p_node == NULL )
{
p_node = p_playlist->status.p_node;
if( !p_node )
{ {
p_playlist->status.i_status = PLAYLIST_STOPPED; p_playlist->status.i_status = PLAYLIST_STOPPED;
p_playlist->request.b_request = VLC_TRUE; p_playlist->request.b_request = VLC_TRUE;
msg_Err( p_playlist, "null node" ); msg_Err( p_playlist, "null node" );
return VLC_SUCCESS; return VLC_SUCCESS;
} }
}
p_playlist->request.i_status = PLAYLIST_RUNNING; p_playlist->request.i_status = PLAYLIST_RUNNING;
p_playlist->request.i_skip = 0; p_playlist->request.i_skip = 0;
p_playlist->request.b_request = VLC_TRUE; p_playlist->request.b_request = VLC_TRUE;
......
...@@ -231,6 +231,8 @@ void playlist_MainLoop( playlist_t *p_playlist ) ...@@ -231,6 +231,8 @@ void playlist_MainLoop( playlist_t *p_playlist )
& PLAYLIST_REMOVE_FLAG ) & PLAYLIST_REMOVE_FLAG )
{ {
playlist_ItemDelete( p_playlist->status.p_item ); playlist_ItemDelete( p_playlist->status.p_item );
if( p_playlist->request.p_item == p_playlist->status.p_item )
p_playlist->request.p_item = NULL;
p_playlist->status.p_item = NULL; p_playlist->status.p_item = NULL;
} }
......
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