]> git.sesse.net Git - vlc/blobdiff - src/audio_output/mixer.c
FSF address change.
[vlc] / src / audio_output / mixer.c
index 972f12e44b0dd196d54bc14ca802aa9380133a23..16631bf4b7eb738ac3f181de087690bddefc7ded 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * 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>
@@ -18,7 +18,7 @@
  *
  * 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.
  *****************************************************************************/
 
 /*****************************************************************************
@@ -274,8 +274,13 @@ static int MixBuffer( aout_instance_t * p_aout )
                 /* 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;
             }