Fixed bug 3584 - Small stack size for audio callback thread

Walter van Niftrik

We have found that since SDL 2.0.5 the audio callback thread is created with a very small stack size. In our application this is leading to stack overflows.

We believe there is a bug at http://hg.libsdl.org/SDL/file/391fd532f79e/src/audio/SDL_audio.c#l1132, where the is_internal_thread flag appears to be inverted.
This commit is contained in:
Sam Lantinga 2017-02-11 16:38:16 -08:00
parent cf31ea1478
commit 886736a2c8
1 changed files with 1 additions and 1 deletions

View File

@ -1129,7 +1129,7 @@ open_audio_device(const char *devname, int iscapture,
const SDL_AudioSpec * desired, SDL_AudioSpec * obtained,
int allowed_changes, int min_id)
{
const SDL_bool is_internal_thread = (desired->callback != NULL);
const SDL_bool is_internal_thread = (desired->callback == NULL);
SDL_AudioDeviceID id = 0;
SDL_AudioSpec _obtained;
SDL_AudioDevice *device;