split pa_memblockq_flush() into two flush commands, one which fixes up the read ptr, and one which fixes up the write ptr

This commit is contained in:
Lennart Poettering 2008-06-26 00:39:31 +02:00
parent 5fccac94e7
commit 1514d13835
5 changed files with 45 additions and 25 deletions

View file

@ -1196,7 +1196,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;
func = pa_memblockq_flush_write;
break;
case SINK_INPUT_MESSAGE_PREBUF_FORCE:
@ -3072,7 +3072,7 @@ static void command_flush_record_stream(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_U
s = pa_idxset_get_by_index(c->record_streams, idx);
CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_NOENTITY);
pa_memblockq_flush(s->memblockq);
pa_memblockq_flush_read(s->memblockq);
pa_pstream_send_simple_ack(c->pstream, tag);
}