mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-01-07 05:43:18 +00:00
audio: Make SDL_GetAudioStreamProperties() thread safe.
This commit is contained in:
@@ -442,9 +442,11 @@ SDL_PropertiesID SDL_GetAudioStreamProperties(SDL_AudioStream *stream)
|
||||
SDL_InvalidParamError("stream");
|
||||
return 0;
|
||||
}
|
||||
SDL_LockMutex(stream->lock);
|
||||
if (stream->props == 0) {
|
||||
stream->props = SDL_CreateProperties();
|
||||
}
|
||||
SDL_UnlockMutex(stream->lock);
|
||||
return stream->props;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user