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.12-wav.patch |
Date: | Sun, 04 Mar 2012 05:51:14 |
Message-Id: | 20120304055105.D33DA2004B@flycatcher.gentoo.org |
1 | mr_bones_ 12/03/04 05:51:05 |
2 | |
3 | Added: sdl-mixer-1.2.12-wav.patch |
4 | Log: |
5 | add upstream patch for failure to load wav situation (bug #406739) |
6 | |
7 | (Portage version: 2.1.10.44/cvs/Linux i686) |
8 | |
9 | Revision Changes Path |
10 | 1.1 media-libs/sdl-mixer/files/sdl-mixer-1.2.12-wav.patch |
11 | |
12 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/sdl-mixer/files/sdl-mixer-1.2.12-wav.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.12-wav.patch?rev=1.1&content-type=text/plain |
14 | |
15 | Index: sdl-mixer-1.2.12-wav.patch |
16 | =================================================================== |
17 | https://bugs.gentoo.org/show_bug.cgi?id=406739 |
18 | Nikos Chantziaras 2012-03-03 03:13:39 EST |
19 | |
20 | There's a bug in the current version of SDL_mixer where failing to load a WAV sample will result in freeing a resource twice, resulting in an application crash. There is an upstream fix for this: |
21 | |
22 | http://hg.libsdl.org/SDL_mixer/rev/ea53a85853dd |
23 | |
24 | Upstream bug: http://bugzilla.libsdl.org/show_bug.cgi?id=1418 |
25 | |
26 | --- a/mixer.c |
27 | +++ b/mixer.c |
28 | @@ -610,13 +610,15 @@ |
29 | break; |
30 | default: |
31 | SDL_SetError("Unrecognized sound file type"); |
32 | - return(0); |
33 | + if ( freesrc ) { |
34 | + SDL_RWclose(src); |
35 | + } |
36 | + loaded = NULL; |
37 | + break; |
38 | } |
39 | if ( !loaded ) { |
40 | + /* The individual loaders have closed src if needed */ |
41 | SDL_free(chunk); |
42 | - if ( freesrc ) { |
43 | - SDL_RWclose(src); |
44 | - } |
45 | return(NULL); |
46 | } |