Skip to content

Commit

Permalink
Fixed bug 3584 - Small stack size for audio callback thread
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
slouken committed Feb 12, 2017
1 parent cf31ea1 commit 886736a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/audio/SDL_audio.c
Expand Up @@ -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;
Expand Down

0 comments on commit 886736a

Please sign in to comment.