Commit ff89ff37 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

aout: only discard input buffers if they are fatally late

parent 32784aa8
...@@ -397,7 +397,7 @@ int aout_DecPlay (audio_output_t *aout, block_t *block, int input_rate) ...@@ -397,7 +397,7 @@ int aout_DecPlay (audio_output_t *aout, block_t *block, int input_rate)
goto drop; /* Pipeline is unrecoverably broken :-( */ goto drop; /* Pipeline is unrecoverably broken :-( */
const mtime_t now = mdate (), advance = block->i_pts - now; 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 { /* Late buffer can be caused by bugs in the decoder, by scheduling
* latency spikes (excessive load, SIGSTOP, etc.) or if buffering is * latency spikes (excessive load, SIGSTOP, etc.) or if buffering is
* insufficient. We assume the PTS is wrong and play the buffer anyway: * insufficient. We assume the PTS is wrong and play the buffer anyway:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment