- /* Apply the desynchronisation requested by the user */
- p_buffer->start_date += p_input->i_desync;
- p_buffer->end_date += p_input->i_desync;
-
- if ( p_buffer->start_date > mdate() + p_input->i_pts_delay +
- AOUT_MAX_ADVANCE_TIME )
- {
- msg_Warn( p_aout, "received buffer in the future (%"PRId64")",
- p_buffer->start_date - mdate());
- if( p_input->p_input_thread )
- {
- vlc_mutex_lock( &p_input->p_input_thread->p->counters.counters_lock);
- stats_UpdateInteger( p_aout,
- p_input->p_input_thread->p->counters.p_lost_abuffers,
- 1, NULL );
- vlc_mutex_unlock( &p_input->p_input_thread->p->counters.counters_lock);
- }
- aout_BufferFree( p_buffer );
- return -1;
- }
-
- p_buffer->end_date = p_buffer->start_date
- + (mtime_t)p_buffer->i_nb_samples * 1000000