mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-09 13:29:59 -05:00
native: rework handling of seeks that depend on variables the client does not know anything about
All seeks/flushes that depend on the playback buffer read pointer cannot be accounted for properly in the client since it does not know the actual read pointer. Due to that the clients do not account for it at all. We need do the same on the server side. And we did, but a little bit too extreme. While we properly have not applied the changes to the "request" counter we still do have to apply it to the "missing" counter. This patch fixes that.
This commit is contained in:
parent
52c66b4766
commit
84782f24c5
7 changed files with 20 additions and 9 deletions
|
|
@ -1325,6 +1325,10 @@ static void handle_seek(playback_stream *s, int64_t indexw) {
|
|||
playback_stream_request_bytes(s);
|
||||
}
|
||||
|
||||
static void flush_write_no_account(pa_memblockq *q) {
|
||||
pa_memblockq_flush_write(q, FALSE);
|
||||
}
|
||||
|
||||
/* Called from thread context */
|
||||
static int sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offset, pa_memchunk *chunk) {
|
||||
pa_sink_input *i = PA_SINK_INPUT(o);
|
||||
|
|
@ -1386,7 +1390,7 @@ static int sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int
|
|||
|
||||
switch (code) {
|
||||
case SINK_INPUT_MESSAGE_FLUSH:
|
||||
func = pa_memblockq_flush_write;
|
||||
func = flush_write_no_account;
|
||||
break;
|
||||
|
||||
case SINK_INPUT_MESSAGE_PREBUF_FORCE:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue