/*****************************************************************************
* mixer.c : audio output mixing operations
*****************************************************************************
- * Copyright (C) 2002-2004 VideoLAN
+ * Copyright (C) 2002-2004 the VideoLAN team
* $Id$
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
/* Round to the nearest multiple */
i_nb_bytes /= p_aout->mixer.mixer.i_bytes_per_frame;
i_nb_bytes *= p_aout->mixer.mixer.i_bytes_per_frame;
-
- if( i_nb_bytes < 0 ) break; /* FIXME: reset state properly */
+ if( i_nb_bytes < 0 )
+ {
+ /* Is it really the best way to do it ? */
+ aout_FifoSet( p_aout, &p_aout->output.fifo, 0 );
+ aout_DateSet( &exact_start_date, 0 );
+ break;
+ }
p_input->p_first_byte_to_mix = p_buffer->p_buffer + i_nb_bytes;
}