Commit 9b9e71ab authored by David Reid's avatar David Reid

PulseAudio: Fix an error with the construction of the stream name.

parent f39bbe2f
......@@ -30189,8 +30189,10 @@ static ma_pa_stream* ma_device__pa_stream_new__pulse(ma_device* pDevice, const c
if (pStreamName != NULL) {
ma_strncpy_s(actualStreamName, sizeof(actualStreamName), pStreamName, (size_t)-1);
} else {
ma_strcpy_s(actualStreamName, sizeof(actualStreamName), "miniaudio:");
ma_itoa_s(g_StreamCounter, actualStreamName + 8, sizeof(actualStreamName)-8, 10); /* 8 = strlen("miniaudio:") */
const char* pBaseName = "miniaudio:";
size_t baseNameLen = strlen(pBaseName);
ma_strcpy_s(actualStreamName, sizeof(actualStreamName), pBaseName);
ma_itoa_s(g_StreamCounter, actualStreamName + baseNameLen, sizeof(actualStreamName)-baseNameLen, 10);
}
g_StreamCounter += 1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment