pulse-server: wait for pending_sample to complete

Wait the reply to be sent and the sample to complete playback before
freeing the sample. Otherwise it might have been possible that the
sample completes before the reply can be sent.
This commit is contained in:
Wim Taymans 2022-02-21 08:57:15 +01:00
parent 1d9be5b25a
commit 0475adbd35
2 changed files with 16 additions and 8 deletions

View file

@ -39,6 +39,8 @@ struct pending_sample {
struct sample_play *play;
struct spa_hook listener;
uint32_t tag;
unsigned ready:1;
unsigned done:1;
};
void pending_sample_free(struct pending_sample *ps);