Commit 450a2fb5 authored by zorglub's avatar zorglub
Browse files

Fix CDDA and a corner-case in playlist handling

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