- /* get the playlist ... */
- if ( i_ret == VLC_SUCCESS )
- {
- p_playlist = (playlist_t *) vlc_object_find( p_demux, VLC_OBJECT_PLAYLIST, FIND_PARENT );
- if( !p_playlist )
- {
- msg_Err( p_demux, "can't find playlist" );
- i_ret = VLC_ENOOBJ;
- }
- }
- /* ... and its current item (to convert it to a node) */
- if ( i_ret == VLC_SUCCESS )
- {
- b_play = E_(FindItem)( p_demux, p_playlist, &p_current );
- playlist_ItemToNode( p_playlist, p_current );
- p_current->input.i_type = ITEM_TYPE_PLAYLIST;
- /* parse the playlist node */
- i_ret = parse_playlist_node( p_demux, p_playlist, p_current,
- p_xml_reader, "playlist" );
- /* true/false - success/egeneric mapping */
- i_ret = ( i_ret==VLC_TRUE ? VLC_SUCCESS : VLC_EGENERIC );
-
- if( b_play )
- {
- playlist_Control( p_playlist, PLAYLIST_VIEWPLAY,
- p_playlist->status.i_view,
- p_playlist->status.p_item, NULL );
- }
- }
-
- if ( p_playlist )
- vlc_object_release( p_playlist );
+ i_ret = parse_playlist_node( p_demux, p_playlist, p_current, NULL,
+ p_xml_reader, "playlist" );
+ HANDLE_PLAY_AND_RELEASE;