* dec.c : audio output API towards decoders
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: dec.c,v 1.9 2003/03/06 23:10:11 gbazin Exp $
+ * $Id: dec.c,v 1.10 2003/05/22 16:01:02 gbazin Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
if( p_input_thread )
{
p_aout->i_pts_delay = p_input_thread->i_pts_delay;
+ p_aout->i_pts_delay += p_aout->p_vlc->i_desync;
vlc_object_release( p_input_thread );
}
else
{
p_aout->i_pts_delay = DEFAULT_PTS_DELAY;
+ p_aout->i_pts_delay += p_aout->p_vlc->i_desync;
}
return p_input;
return -1;
}
+ /* Apply the desynchronisation requested by the user */
+ p_buffer->start_date += p_aout->p_vlc->i_desync;
+ p_buffer->end_date += p_aout->p_vlc->i_desync;
+
if ( p_buffer->start_date > mdate() + p_aout->i_pts_delay +
AOUT_MAX_ADVANCE_TIME )
{
* decoders.
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
- * $Id: input.c,v 1.229 2003/05/05 16:09:35 gbazin Exp $
+ * $Id: input.c,v 1.230 2003/05/22 16:01:02 gbazin Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
p_input->i_bufsize = INPUT_DEFAULT_BUFSIZE;
}
+ /* If the desynchronisation requested by the user is < 0, we need to
+ * cache more data. */
+ if( p_input->p_vlc->i_desync < 0 )
+ p_input->i_pts_delay -= p_input->p_vlc->i_desync;
+
if( p_input->p_current_data == NULL && p_input->pf_read != NULL )
{
while( !input_FillBuffer( p_input ) )
* input_clock.c: Clock/System date convertions, stream management
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: input_clock.c,v 1.36 2002/12/12 15:10:58 gbazin Exp $
+ * $Id: input_clock.c,v 1.37 2003/05/22 16:01:02 gbazin Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
if( p_pgrm->i_synchro_state == SYNCHRO_OK )
{
return( ClockToSysdate( p_input, p_pgrm, i_ts + p_pgrm->delta_cr )
- + p_input->i_pts_delay
- + (p_input->p_vlc->i_desync > 0
- ? p_input->p_vlc->i_desync : 0) );
+ + p_input->i_pts_delay );
}
else
{