- /* Select the next playlist item */
- intf_PlaylistNext( p_main->p_playlist );
-
- /* don't loop by default: stop at playlist end */
- if( p_main->p_playlist->i_index == -1 )
- {
- p_main->p_playlist->b_stopped = 1;
- }
- else
- {
- input_thread_t *p_input;
-
- p_main->p_playlist->b_stopped = 0;
- p_main->p_playlist->i_mode = PLAYLIST_FORWARD +
- main_GetIntVariable( PLAYLIST_LOOP_VAR,
- PLAYLIST_LOOP_DEFAULT );
- intf_WarnMsg( 3, "intf: creating new input thread" );
- p_input = input_CreateThread( &p_main->p_playlist->current,
- NULL );
- if( p_input != NULL )
- {
- p_input_bank->pp_input[ p_input_bank->i_count ] = p_input;
- p_input_bank->i_count++;
- }
- }
- }
- else
- {
- /* playing has been stopped: we no longer need outputs */
- if( p_aout_bank->i_count )
- {
- /* FIXME kludge that does not work with several outputs */
- aout_DestroyThread( p_aout_bank->pp_aout[0], NULL );
- p_aout_bank->i_count--;
- }
- if( p_vout_bank->i_count )
- {
- vout_DestroyThread( p_vout_bank->pp_vout[0], NULL );
- p_vout_bank->i_count--;
- }