[SDL] patch for SDL_mixer-1.2.7
Emmanuel Anne
manu at absysteme.fr
Tue Jun 6 15:13:43 PDT 2006
SDL_mixer crashes if it has timidity support compiled in and if you just
open it twice in the same program (for example to play things at
different sample rates).
So attached are a very simple program to test the bug (it creates a
segfault with the standard sdl_mixer-1.2.7), and the very tiny patch to
fix it !
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: text/x-csrc
Size: 281 bytes
Desc: not available
Url : http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20060607/22fc2956/attachment.c
-------------- next part --------------
diff -u -B -w -r old/SDL_mixer-1.2.7/timidity/common.c new/SDL_mixer-1.2.7/timidity/common.c
--- old/SDL_mixer-1.2.7/timidity/common.c 2006-05-14 21:54:25.000000000 +0200
+++ new/SDL_mixer-1.2.7/timidity/common.c 2006-06-06 22:02:13.000000000 +0200
@@ -113,7 +113,7 @@
}
#ifdef DEFAULT_PATH
- if (firsttime && (pathlist==NULL)) {
+ if (firsttime || (pathlist==NULL)) {
/* Generate path list */
add_to_pathlist(DEFAULT_PATH);
firsttime=0;
@@ -244,4 +244,5 @@
free(plp);
plp = next_plp;
}
+ pathlist = NULL;
}
More information about the SDL
mailing list