audio: Fix audio stream incorrectly not unlocking during unbind.
(This patch was from @0x1F9F1, thanks!) Fixes #9379.
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user