[vlc-commits] aout: add wait parameter to aout_DecFlush()

Rémi Denis-Courmont git at videolan.org
Sat Mar 21 21:28:41 CET 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Mar 21 21:56:50 2015 +0200| [90a41800049ec54a0191613fdfb37c3338d9d297] | committer: Rémi Denis-Courmont

aout: add wait parameter to aout_DecFlush()

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

 src/audio_output/aout_internal.h |    2 +-
 src/audio_output/dec.c           |    4 ++--
 src/input/decoder.c              |    6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/audio_output/aout_internal.h b/src/audio_output/aout_internal.h
index 10c790b..9f6a453 100644
--- a/src/audio_output/aout_internal.h
+++ b/src/audio_output/aout_internal.h
@@ -139,7 +139,7 @@ void aout_DecDelete(audio_output_t *);
 int aout_DecPlay(audio_output_t *, block_t *, int i_input_rate);
 int aout_DecGetResetLost(audio_output_t *);
 void aout_DecChangePause(audio_output_t *, bool b_paused, mtime_t i_date);
-void aout_DecFlush(audio_output_t *);
+void aout_DecFlush(audio_output_t *, bool wait);
 bool aout_DecIsEmpty(audio_output_t *);
 void aout_RequestRestart (audio_output_t *, unsigned);
 
diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index 2dfcff0..7444072 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -411,14 +411,14 @@ void aout_DecChangePause (audio_output_t *aout, bool paused, mtime_t date)
     aout_OutputUnlock (aout);
 }
 
-void aout_DecFlush (audio_output_t *aout)
+void aout_DecFlush (audio_output_t *aout, bool wait)
 {
     aout_owner_t *owner = aout_owner (aout);
 
     aout_OutputLock (aout);
     owner->sync.end = VLC_TS_INVALID;
     if (owner->mixer_format.i_format)
-        aout_OutputFlush (aout, false);
+        aout_OutputFlush (aout, wait);
     aout_OutputUnlock (aout);
 }
 
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 452f3f8..57d1853 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1152,7 +1152,7 @@ static void DecoderDecodeAudio( decoder_t *p_dec, block_t *p_block )
         {
             msg_Dbg( p_dec, "End of audio preroll" );
             if( p_owner->p_aout )
-                aout_DecFlush( p_owner->p_aout );
+                aout_DecFlush( p_owner->p_aout, false );
             /* */
             p_owner->i_preroll_end = VLC_TS_INVALID;
         }
@@ -1218,7 +1218,7 @@ static void DecoderProcessAudio( decoder_t *p_dec, block_t *p_block, bool b_flus
     }
 
     if( b_flush && p_owner->p_aout )
-        aout_DecFlush( p_owner->p_aout );
+        aout_DecFlush( p_owner->p_aout, false );
 }
 
 static void DecoderPlaySpu( decoder_t *p_dec, subpicture_t *p_subpic )
@@ -1642,7 +1642,7 @@ static void DeleteDecoder( decoder_t * p_dec )
     if( p_owner->p_aout )
     {
         /* TODO: REVISIT gap-less audio */
-        aout_DecFlush( p_owner->p_aout );
+        aout_DecFlush( p_owner->p_aout, false );
         aout_DecDelete( p_owner->p_aout );
         input_resource_PutAout( p_owner->p_resource, p_owner->p_aout );
         if( p_owner->p_input != NULL )



More information about the vlc-commits mailing list