[vlc-commits] aout: rename aout_FifoSet() to aout_FifoReset()

Rémi Denis-Courmont git at videolan.org
Mon Aug 1 18:35:26 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug  1 19:23:28 2011 +0300| [274f047ae3f5e5a1d51f7de96c8ff007d21be838] | committer: Rémi Denis-Courmont

aout: rename aout_FifoSet() to aout_FifoReset()

The date parameter is always zero, remove it.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=274f047ae3f5e5a1d51f7de96c8ff007d21be838
---

 src/audio_output/aout_internal.h |    2 +-
 src/audio_output/common.c        |    7 +++----
 src/audio_output/dec.c           |    2 +-
 src/audio_output/input.c         |    6 +++---
 src/audio_output/mixer.c         |    2 +-
 src/audio_output/output.c        |    2 +-
 6 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/src/audio_output/aout_internal.h b/src/audio_output/aout_internal.h
index 2eacf9d..c94311e 100644
--- a/src/audio_output/aout_internal.h
+++ b/src/audio_output/aout_internal.h
@@ -135,7 +135,7 @@ void aout_FifoInit( vlc_object_t *, aout_fifo_t *, uint32_t );
 #define aout_FifoInit(o, f, r) aout_FifoInit(VLC_OBJECT(o), f, r)
 mtime_t aout_FifoNextStart( const aout_fifo_t * ) VLC_USED;
 void aout_FifoPush( aout_fifo_t *, aout_buffer_t * );
-void aout_FifoSet( aout_fifo_t *, mtime_t );
+void aout_FifoReset( aout_fifo_t * );
 void aout_FifoMoveDates( aout_fifo_t *, mtime_t );
 void aout_FifoDestroy( aout_fifo_t * p_fifo );
 void aout_FormatsPrint( audio_output_t * p_aout, const char * psz_text, const audio_sample_format_t * p_format1, const audio_sample_format_t * p_format2 );
diff --git a/src/audio_output/common.c b/src/audio_output/common.c
index 6ef4fdc..91c3f00 100644
--- a/src/audio_output/common.c
+++ b/src/audio_output/common.c
@@ -363,14 +363,13 @@ void aout_FifoPush( aout_fifo_t * p_fifo, aout_buffer_t * p_buffer )
 }
 
 /*****************************************************************************
- * aout_FifoSet : set end_date and trash all buffers (because they aren't
- * properly dated)
+ * aout_FifoReset: trash all buffers
  *****************************************************************************/
-void aout_FifoSet( aout_fifo_t * p_fifo, mtime_t date )
+void aout_FifoReset( aout_fifo_t * p_fifo )
 {
     aout_buffer_t * p_buffer;
 
-    date_Set( &p_fifo->end_date, date );
+    date_Set( &p_fifo->end_date, 0 );
     p_buffer = p_fifo->p_first;
     while ( p_buffer != NULL )
     {
diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index 822869b..5aed63b 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -241,7 +241,7 @@ void aout_DecChangePause( audio_output_t *p_aout, aout_input_t *p_input, bool b_
 void aout_DecFlush( audio_output_t *p_aout, aout_input_t *p_input )
 {
     aout_lock( p_aout );
-    aout_FifoSet( &p_input->fifo, 0 );
+    aout_FifoReset( &p_input->fifo );
     aout_unlock( p_aout );
 }
 
diff --git a/src/audio_output/input.c b/src/audio_output/input.c
index 5dab19a..8ed95ce 100644
--- a/src/audio_output/input.c
+++ b/src/audio_output/input.c
@@ -549,8 +549,8 @@ void aout_InputPlay( audio_output_t * p_aout, aout_input_t * p_input,
          * happen :). */
         msg_Warn( p_aout, "computed PTS is out of range (%"PRId64"), "
                   "clearing out", now - start_date );
-        aout_FifoSet( &p_input->fifo, 0 );
-        aout_FifoSet( &p_aout->fifo, 0 );
+        aout_FifoReset( &p_input->fifo );
+        aout_FifoReset( &p_aout->fifo );
         if ( p_input->i_resampling_type != AOUT_RESAMPLING_NONE )
             msg_Warn( p_aout, "timing screwed, stopping resampling" );
         inputResamplingStop( p_input );
@@ -580,7 +580,7 @@ void aout_InputPlay( audio_output_t * p_aout, aout_input_t * p_input,
     {
         msg_Warn( p_aout, "buffer way too early (%"PRId64"), clearing queue",
                   drift );
-        aout_FifoSet( &p_input->fifo, 0 );
+        aout_FifoReset( &p_input->fifo );
         if ( p_input->i_resampling_type != AOUT_RESAMPLING_NONE )
             msg_Warn( p_aout, "timing screwed, stopping resampling" );
         inputResamplingStop( p_input );
diff --git a/src/audio_output/mixer.c b/src/audio_output/mixer.c
index fdefdb6..1e11021 100644
--- a/src/audio_output/mixer.c
+++ b/src/audio_output/mixer.c
@@ -173,7 +173,7 @@ static int MixBuffer( audio_output_t * p_aout, float volume )
         if( delta < 0 )
         {
             /* Is it really the best way to do it ? */
-            aout_FifoSet( &p_aout->fifo, 0 );
+            aout_FifoReset( &p_aout->fifo );
             return -1;
         }
         if( delta > 0 )
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index b7acaa6..fb1eed5 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -385,7 +385,7 @@ aout_buffer_t * aout_OutputNextBuffer( audio_output_t * p_aout,
        * to deal with this kind of starvation. */
 
         /* Set date to 0, to allow the mixer to send a new buffer ASAP */
-        aout_FifoSet( &p_aout->fifo, 0 );
+        aout_FifoReset( &p_aout->fifo );
         if ( !p_aout->b_starving )
             msg_Dbg( p_aout,
                  "audio output is starving (no input), playing silence" );



More information about the vlc-commits mailing list