[vlc-commits] aout: only discard input buffers if they are fatally late

Rémi Denis-Courmont git at videolan.org
Thu Nov 15 17:04:26 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Nov 15 18:03:37 2012 +0200| [ff89ff37090060aca89e455fb36d8a9863357ec0] | committer: Rémi Denis-Courmont

aout: only discard input buffers if they are fatally late

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

 src/audio_output/dec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index c88c91b..2ec340a 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -397,7 +397,7 @@ int aout_DecPlay (audio_output_t *aout, block_t *block, int input_rate)
         goto drop; /* Pipeline is unrecoverably broken :-( */
 
     const mtime_t now = mdate (), advance = block->i_pts - now;
-    if (advance < AOUT_MIN_PREPARE_TIME)
+    if (advance < -AOUT_MAX_PTS_DELAY)
     {   /* Late buffer can be caused by bugs in the decoder, by scheduling
          * latency spikes (excessive load, SIGSTOP, etc.) or if buffering is
          * insufficient. We assume the PTS is wrong and play the buffer anyway:



More information about the vlc-commits mailing list