SDL: audio: Make SDL_GetAudioStreamProperties() thread safe.

From 8d3bec99a736144a4e9bec7ba7651a0ecfb4ef54 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Thu, 24 Oct 2024 14:36:57 -0400
Subject: [PATCH] audio: Make SDL_GetAudioStreamProperties() thread safe.

---
 src/audio/SDL_audiocvt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/audio/SDL_audiocvt.c b/src/audio/SDL_audiocvt.c
index 831b36e8c5dff..644df39d5d4e7 100644
--- a/src/audio/SDL_audiocvt.c
+++ b/src/audio/SDL_audiocvt.c
@@ -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;
 }