]> git.sesse.net Git - vlc/commitdiff
aout: only discard input buffers if they are fatally late
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 15 Nov 2012 16:03:37 +0000 (18:03 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 15 Nov 2012 16:03:37 +0000 (18:03 +0200)
src/audio_output/dec.c

index c88c91be6290772d7e30516a58501e151e8950e9..2ec340a33588d3f0f842269438f6547201039cd5 100644 (file)
@@ -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: