pulse-server: if prebuf == 0, keep increasing playing_for

Or else the client pauses and time stops. Makes GStreamer
pipelines complete.
This commit is contained in:
Wim Taymans 2021-01-30 21:04:07 +01:00
parent d1c0244512
commit 60aef11072

View file

@ -1570,10 +1570,10 @@ static void stream_process(void *data)
} else {
pd.underrun_for = size;
pd.underrun = true;
if (stream->attr.prebuf == 0)
pd.missing = size;
}
if (stream->attr.prebuf == 0) {
pd.missing = size;
pd.playing_for = size;
pd.read_index += size;
spa_ringbuffer_read_update(&stream->ring, pd.read_index);
}
@ -2172,9 +2172,11 @@ static int do_get_playback_latency(struct client *client, uint32_t command, uint
if (stream == NULL || stream->type != STREAM_TYPE_PLAYBACK)
return -ENOENT;
pw_log_debug("read:%"PRIi64" write:%"PRIi64" queued:%"PRIi64" delay:%"PRIi64,
pw_log_debug("read:%"PRIi64" write:%"PRIi64" queued:%"PRIi64" delay:%"PRIi64
" playing:%"PRIu64,
stream->read_index, stream->write_index,
stream->write_index - stream->read_index, stream->delay);
stream->write_index - stream->read_index, stream->delay,
stream->playing_for);
gettimeofday(&now, NULL);