Commit e43ea251 authored by Rafaël Carré's avatar Rafaël Carré
Browse files

forward port [25261]

workaround buggy alsa drivers
parent f46398cf
......@@ -834,9 +834,11 @@ static void ALSAFill( aout_instance_t * p_aout )
}
else
{
/* Here the device should be in RUNNING state.
* p_status is valid. */
/* Here the device should be in RUNNING state, p_status is valid. */
snd_pcm_sframes_t delay = snd_pcm_status_get_delay( p_status );
if( delay == 0 ) /* workaround buggy alsa drivers */
if( snd_pcm_delay( p_sys->p_snd_pcm, &delay ) < 0 )
delay = 0; /* FIXME: use a positive minimal delay */
int i_bytes = snd_pcm_frames_to_bytes( p_sys->p_snd_pcm, delay );
next_date = mdate() + ( (mtime_t)i_bytes * 1000000
/ p_aout->output.output.i_bytes_per_frame
......
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