Gentoo Archives: gentoo-commits

From: "Michael Sterrett (mr_bones_)" <mr_bones_@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-libs/sdl-mixer/files: sdl-mixer-1.2.11-midi.patch
Date: Mon, 02 Jan 2012 21:39:47
Message-Id: 20120102213918.E80E42004B@flycatcher.gentoo.org
1 mr_bones_ 12/01/02 21:39:18
2
3 Added: sdl-mixer-1.2.11-midi.patch
4 Log:
5 add upstream patch for playing some midi files (bug #397333)
6
7 (Portage version: 2.1.10.41/cvs/Linux i686)
8
9 Revision Changes Path
10 1.1 media-libs/sdl-mixer/files/sdl-mixer-1.2.11-midi.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/sdl-mixer/files/sdl-mixer-1.2.11-midi.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/sdl-mixer/files/sdl-mixer-1.2.11-midi.patch?rev=1.1&content-type=text/plain
14
15 Index: sdl-mixer-1.2.11-midi.patch
16 ===================================================================
17 For bug 397333
18 https://bugs.gentoo.org/show_bug.cgi?id=397333
19
20 upstream patch pulled from:
21 http://hg.libsdl.org/SDL_mixer/raw-diff/7a8f0018e23d/timidity/readmidi.c
22
23 --- a/timidity/readmidi.c
24 +++ b/timidity/readmidi.c
25 @@ -530,7 +530,7 @@
26 {
27 MidiEventList *meep;
28 MidiEventList *next, *new;
29 - int32 len;
30 + int32 len, next_pos, pos;
31 char tmp[4];
32
33 meep=evlist;
34 @@ -552,7 +552,7 @@
35 return -1;
36 }
37 len=BE_LONG(len);
38 -
39 + next_pos = SDL_RWtell(rw) + len;
40 if (memcmp(tmp, "MTrk", 4))
41 {
42 ctl->cmsg(CMSG_ERROR, VERB_NORMAL,
43 @@ -567,6 +567,9 @@
44
45 if (new==MAGIC_EOT) /* End-of-track Hack. */
46 {
47 + pos = SDL_RWtell(rw);
48 + if (pos < next_pos)
49 + SDL_RWseek(rw, next_pos - pos, RW_SEEK_CUR);
50 return 0;
51 }