mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa: handle invalid timestamp from broken drivers
This commit is contained in:
parent
43b8ea9b83
commit
a37694fde5
1 changed files with 4 additions and 0 deletions
|
|
@ -559,6 +559,10 @@ static void alsa_on_playback_timeout_event(struct spa_source *source)
|
|||
|
||||
avail = snd_pcm_status_get_avail(status);
|
||||
snd_pcm_status_get_htstamp(status, &state->now);
|
||||
if (state->now.tv_sec == 0 && state->now.tv_nsec == 0) {
|
||||
spa_log_warn(state->log, "0 from snd_pcm_status_get_htstamp %ld", avail);
|
||||
clock_gettime(CLOCK_MONOTONIC, &state->now);
|
||||
}
|
||||
|
||||
if (avail > state->buffer_frames)
|
||||
avail = state->buffer_frames;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue