+ /* 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 ("I64Fd")",
+ p_buffer->start_date - mdate());
+ if( p_input->p_input_thread )
+ {
+ vlc_mutex_lock( &p_input->p_input_thread->counters.counters_lock);
+ stats_UpdateInteger( p_aout,
+ p_input->p_input_thread->counters.p_lost_abuffers,
+ 1, NULL );
+ vlc_mutex_unlock( &p_input->p_input_thread->counters.counters_lock);
+ }
+ aout_BufferFree( p_buffer );
+ return -1;
+ }
+