vlc_mutex_init( &p_input->lock );
- p_input->b_changed = false;
p_input->b_error = true;
p_input->b_paused = false;
p_input->i_pause_date = 0;
/ p_input->input.i_frame_length;
block = block_Alloc( length );
- /* Suppose the decoder doesn't have more than one buffered buffer */
- p_input->b_changed = false;
-
aout_unlock_input( NULL, p_input );
if( likely(block != NULL) )
return -1;
}
- if( p_input->b_changed )
- {
- /* Maybe the allocation size has changed. Re-allocate a buffer. */
- aout_buffer_t * p_new_buffer;
- mtime_t duration = (1000000 * (mtime_t)p_buffer->i_nb_samples)
- / p_input->input.i_rate;
-
- p_new_buffer = aout_BufferAlloc( &p_input->input_alloc, duration, NULL);
- vlc_memcpy( p_new_buffer->p_buffer, p_buffer->p_buffer,
- p_buffer->i_buffer );
- p_new_buffer->i_nb_samples = p_buffer->i_nb_samples;
- p_new_buffer->i_buffer = p_buffer->i_buffer;
- p_new_buffer->i_pts = p_buffer->i_pts;
- p_new_buffer->i_length = p_buffer->i_length;
- aout_BufferFree( p_buffer );
- p_buffer = p_new_buffer;
- p_input->b_changed = false;
- }
-
aout_InputCheckAndRestart( p_aout, p_input );
aout_unlock_mixer( p_aout );
{
aout_input_t * p_input = p_aout->pp_inputs[i];
b_error |= aout_InputNew( p_aout, p_input, &p_input->request_vout );
- p_input->b_changed = 1;
aout_unlock_input( p_aout, p_input );
}