mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-22 22:01:46 +00:00
[client] audio/pw: fix memory leak and gracefully shutdown
This commit is contained in:
parent
54e7542414
commit
5629655f74
2 changed files with 4 additions and 0 deletions
|
@ -197,6 +197,7 @@ static void pipewire_playbackStopStream(void)
|
|||
pw_stream_destroy(pw.playback.stream);
|
||||
pw.playback.stream = NULL;
|
||||
pw.playback.rateMatch = NULL;
|
||||
ringbuffer_free(&pw.playback.buffer);
|
||||
pw_thread_loop_unlock(pw.thread);
|
||||
}
|
||||
|
||||
|
|
|
@ -72,6 +72,9 @@ void audio_free(void)
|
|||
if (!audio.audioDev)
|
||||
return;
|
||||
|
||||
audio_playbackStop();
|
||||
audio_recordStop();
|
||||
|
||||
audio.audioDev->free();
|
||||
audio.audioDev = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue