audio: Fix audio stream incorrectly not unlocking during unbind.
(This patch was from @0x1F9F1, thanks!) Fixes #9379.main
parent
38e3c6a4aa
commit
d00ccc1546
|
@ -1903,7 +1903,7 @@ void SDL_UnbindAudioStreams(SDL_AudioStream **streams, int num_streams)
|
||||||
// Finalize and unlock everything.
|
// Finalize and unlock everything.
|
||||||
for (int i = 0; i < num_streams; i++) {
|
for (int i = 0; i < num_streams; i++) {
|
||||||
SDL_AudioStream *stream = streams[i];
|
SDL_AudioStream *stream = streams[i];
|
||||||
if (stream && stream->bound_device) {
|
if (stream) {
|
||||||
SDL_LogicalAudioDevice *logdev = stream->bound_device;
|
SDL_LogicalAudioDevice *logdev = stream->bound_device;
|
||||||
stream->bound_device = NULL;
|
stream->bound_device = NULL;
|
||||||
SDL_UnlockMutex(stream->lock);
|
SDL_UnlockMutex(stream->lock);
|
||||||
|
|
Loading…
Reference in New Issue