[vlc-commits] aout: remove aout_DecIsEmpty()

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


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Mar 21 22:02:42 2015 +0200| [a308b7a17466bb91908a518c93b36dacb49212e7] | committer: Rémi Denis-Courmont

aout: remove aout_DecIsEmpty()

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

 src/audio_output/aout_internal.h |    1 -
 src/audio_output/dec.c           |   18 ------------------
 2 files changed, 19 deletions(-)

diff --git a/src/audio_output/aout_internal.h b/src/audio_output/aout_internal.h
index 9f6a453..ec729fb 100644
--- a/src/audio_output/aout_internal.h
+++ b/src/audio_output/aout_internal.h
@@ -140,7 +140,6 @@ 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 *, bool wait);
-bool aout_DecIsEmpty(audio_output_t *);
 void aout_RequestRestart (audio_output_t *, unsigned);
 
 static inline void aout_InputRequestRestart(audio_output_t *aout)
diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index 7444072..5e5eb99 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -421,21 +421,3 @@ void aout_DecFlush (audio_output_t *aout, bool wait)
         aout_OutputFlush (aout, wait);
     aout_OutputUnlock (aout);
 }
-
-bool aout_DecIsEmpty (audio_output_t *aout)
-{
-    aout_owner_t *owner = aout_owner (aout);
-    mtime_t now = mdate ();
-    bool empty = true;
-
-    aout_OutputLock (aout);
-    if (owner->sync.end != VLC_TS_INVALID)
-        empty = owner->sync.end <= now;
-    if (empty && owner->mixer_format.i_format)
-        /* The last PTS has elapsed already. So the underlying audio output
-         * buffer should be empty or almost. Thus draining should be fast
-         * and will not block the caller too long. */
-        aout_OutputFlush (aout, true);
-    aout_OutputUnlock (aout);
-    return empty;
-}



More information about the vlc-commits mailing list