pulse-server: make sure we never try to ask more than tlength

This commit is contained in:
Wim Taymans 2021-01-18 16:23:24 +01:00
parent 76aff7640f
commit 235d25316c

View file

@ -1378,6 +1378,7 @@ do_process_done(struct spa_loop *loop,
send_stream_started(stream); send_stream_started(stream);
} }
stream->missing += pd->playing_for + pd->underrun_for; stream->missing += pd->playing_for + pd->underrun_for;
stream->missing = SPA_MIN(stream->missing, stream->attr.tlength);
stream->playing_for += pd->playing_for; stream->playing_for += pd->playing_for;
stream->underrun_for += pd->underrun_for; stream->underrun_for += pd->underrun_for;