sdl-mixer causes hangs in some ports when it does not initialize smpeg
properly
These patches update sdl-mixer and sdl2-mixer so that they initialize
smpeg properly. This fixes hangs in playmus as well as angband.
Index: patches/patch-music_c
===================================================================
RCS file: patches/patch-music_c
diff -N patches/patch-music_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-music_c 29 Sep 2016 04:43:26 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- music.c.orig Sat Jan 2 22:15:59 2016
++++ music.c Wed Sep 28 21:41:50 2016
+@@ -655,7 +655,7 @@ Mix_Music *Mix_LoadMUSType_RW(SDL_RWops *src, Mix_Musi
+ if (Mix_Init(MIX_INIT_MP3)) {
+ SMPEG_Info info;
+ music->type = MUS_MP3;
+- music->data.mp3 = smpeg.SMPEG_new_rwops(src, &info, freesrc, 0);
++ music->data.mp3 = smpeg.SMPEG_new_rwops(src, &info, freesrc, 1);
+ if (!info.has_audio) {
+ Mix_SetError("MPEG file does not have any audio stream.");
+ smpeg.SMPEG_delete(music->data.mp3);
Index: patches/patch-music_c
===================================================================
RCS file: patches/patch-music_c
diff -N patches/patch-music_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-music_c 29 Sep 2016 04:38:27 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- music.c.orig Mon Sep 26 23:40:36 2016
++++ music.c Mon Sep 26 23:39:30 2016
+@@ -657,7 +657,7 @@ Mix_Music *Mix_LoadMUSType_RW(SDL_RWops *rw, Mix_Music
+ if ( Mix_Init(MIX_INIT_MP3) ) {
+ SMPEG_Info info;
+ music->type = MUS_MP3;
+- music->data.mp3 = smpeg.SMPEG_new_rwops(rw, &info, 0);
++ music->data.mp3 = smpeg.SMPEG_new_rwops(rw, &info, 1);
+ if ( !info.has_audio ) {
+ Mix_SetError("MPEG file does not have any audio stream.");
+ music->error = 1;