Commit f13993e1 authored by Cyril Deguet's avatar Cyril Deguet

* src/audio_output/output.c: check if start_date is null in

   aout_OutputNextBuffer(), then do not try to resample or play silences.
   Now everything works perfectly with screwed ALSA drivers that always
   return zero in snd_pcm_status_get_tstamp() (at last!!!)
parent 1f5ad519
......@@ -306,8 +306,11 @@ aout_buffer_t * aout_OutputNextBuffer( aout_instance_t * p_aout,
}
/* Here we suppose that all buffers have the same duration - this is
* generally true, and anyway if it's wrong it won't be a disaster. */
if ( p_buffer->start_date > start_date
* generally true, and anyway if it's wrong it won't be a disaster.
* start_date may be null with some screwed ALSA driver; then do not
* try to play silences or resample.
*/
if ( start_date && p_buffer->start_date > start_date
+ (p_buffer->end_date - p_buffer->start_date) )
/*
* + AOUT_PTS_TOLERANCE )
......@@ -326,7 +329,7 @@ aout_buffer_t * aout_OutputNextBuffer( aout_instance_t * p_aout,
p_aout->output.b_starving = 0;
if ( !b_can_sleek &&
if ( !b_can_sleek && start_date &&
( (p_buffer->start_date - start_date > AOUT_PTS_TOLERANCE)
|| (start_date - p_buffer->start_date > AOUT_PTS_TOLERANCE) ) )
{
......
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