alsa: only pull once

This commit is contained in:
Wim Taymans 2018-03-14 12:17:45 +01:00
parent 6eea9247ea
commit 52efeb5181
2 changed files with 2 additions and 1 deletions

View file

@ -343,6 +343,8 @@ static inline void try_pull(struct state *state, snd_pcm_uframes_t frames,
if (spa_list_is_empty(&state->ready) && do_pull) {
spa_log_trace(state->log, "alsa-util %p: %d %lu", state, io->status,
state->filled + written);
if (io->status == SPA_STATUS_NEED_BUFFER)
return;
io->status = SPA_STATUS_NEED_BUFFER;
if (state->range) {
state->range->offset = state->sample_count * state->frame_size;