}
else
{
- p_play_item = playlist_GetNextLeaf( p_playlist,
- p_item,
- NULL,
- true,
- false );
- char *psz_name = input_item_GetName(p_play_item->p_input);
- free(psz_name);
+ p_play_item = p_item->pp_children[pos];
+ /* NOTE: this is a work around the general bug:
+ if node-to-be-played contains sub-nodes, then second instead
+ of first leaf starts playing (only in case the leafs have just
+ been instered and playlist has not yet been rebuilt.)
+ */
+ while( p_play_item->i_children > 0 )
+ p_play_item = p_play_item->pp_children[0];
}
playlist_Control( p_playlist, PLAYLIST_VIEWPLAY,
add.i_item = i_item_id;
add.i_node = i_node_id;
- vlc_value_t val;
- val.p_address = &add;
-
- var_Set( p_playlist, "playlist-item-append", val );
+ var_SetAddress( p_playlist, "playlist-item-append", &add );
}
/***************************************************************************