[Pkg-sdl-commits] r270 - in unstable/sdl-mixer1.2/debian: . patches
Manuel A. Fernandez Montecelo
mafm-guest at alioth.debian.org
Sun Nov 20 11:17:29 UTC 2011
Author: mafm-guest
Date: 2011-11-20 23:17:27 +0000 (Sun, 20 Nov 2011)
New Revision: 270
Added:
unstable/sdl-mixer1.2/debian/patches/230_racecondition_hg884a700fb3ff.diff
Modified:
unstable/sdl-mixer1.2/debian/changelog
unstable/sdl-mixer1.2/debian/libsdl-mixer1.2-dev.install
unstable/sdl-mixer1.2/debian/patches/series
Log:
Updating SDL_Mixer's debian/ to the contents of 1.2.8-6.4, including NMUs
Modified: unstable/sdl-mixer1.2/debian/changelog
===================================================================
--- unstable/sdl-mixer1.2/debian/changelog 2011-05-31 21:18:01 UTC (rev 269)
+++ unstable/sdl-mixer1.2/debian/changelog 2011-11-20 23:17:27 UTC (rev 270)
@@ -1,3 +1,32 @@
+sdl-mixer1.2 (1.2.8-6.4) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Stop shipping la file. Closes: #633326.
+
+ -- Regis Boudin <regis at debian.org> Sat, 24 Sep 2011 16:55:30 +0100
+
+sdl-mixer1.2 (1.2.8-6.3) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * *really* upload to unstable.
+
+ -- Jon Dowland <jmtd at debian.org> Sat, 11 Dec 2010 09:11:33 +0000
+
+sdl-mixer1.2 (1.2.8-6.2) experimental; urgency=low
+
+ * Non-maintainer upload.
+ * Upload to unstable.
+
+ -- Jon Dowland <jmtd at debian.org> Fri, 10 Dec 2010 22:55:16 +0000
+
+sdl-mixer1.2 (1.2.8-6.1) experimental; urgency=low
+
+ * Non-maintainer upload.
+ * Backport a fix for a race condition in positional effects.
+ Closes: #605504.
+
+ -- Jon Dowland <jmtd at debian.org> Wed, 08 Dec 2010 20:07:08 +0000
+
sdl-mixer1.2 (1.2.8-6) unstable; urgency=low
[ Barry deFreese ]
Modified: unstable/sdl-mixer1.2/debian/libsdl-mixer1.2-dev.install
===================================================================
--- unstable/sdl-mixer1.2/debian/libsdl-mixer1.2-dev.install 2011-05-31 21:18:01 UTC (rev 269)
+++ unstable/sdl-mixer1.2/debian/libsdl-mixer1.2-dev.install 2011-11-20 23:17:27 UTC (rev 270)
@@ -1,4 +1,3 @@
usr/include/SDL
usr/lib/libSDL_mixer.a
-usr/lib/libSDL_mixer.la
usr/lib/libSDL_mixer.so
Added: unstable/sdl-mixer1.2/debian/patches/230_racecondition_hg884a700fb3ff.diff
===================================================================
--- unstable/sdl-mixer1.2/debian/patches/230_racecondition_hg884a700fb3ff.diff (rev 0)
+++ unstable/sdl-mixer1.2/debian/patches/230_racecondition_hg884a700fb3ff.diff 2011-11-20 23:17:27 UTC (rev 270)
@@ -0,0 +1,267 @@
+
+# HG changeset patch
+# User Ryan C. Gordon <icculus at icculus.org>
+# Date 1255229952 0
+# Node ID 884a700fb3ff896d334c0f34f22e738a9586b6b4
+# Parent f86cc112a195522a1e918f44fd1b2065ca670af6
+Corrected race condition in positional effects.
+
+ Fixes Bugzilla #651.
+
+diff --git a/effect_position.c b/effect_position.c
+--- a/effect_position.c
++++ b/effect_position.c
+@@ -1427,6 +1427,8 @@
+ int channels;
+ Uint16 format;
+ position_args *args = NULL;
++ int retval = 1;
++
+ Mix_QuerySpec(NULL, &format, &channels);
+
+ if (channels != 2 && channels != 4 && channels != 6) /* it's a no-op; we call that successful. */
+@@ -1449,16 +1451,22 @@
+ if (f == NULL)
+ return(0);
+
++ SDL_LockAudio();
+ args = get_position_arg(channel);
+- if (!args)
++ if (!args) {
++ SDL_UnlockAudio();
+ return(0);
++ }
+
+ /* it's a no-op; unregister the effect, if it's registered. */
+ if ((args->distance_u8 == 255) && (left == 255) && (right == 255)) {
+ if (args->in_use) {
+- return(Mix_UnregisterEffect(channel, f));
++ retval = _Mix_UnregisterEffect_locked(channel, f);
++ SDL_UnlockAudio();
++ return(retval);
+ } else {
+- return(1);
++ SDL_UnlockAudio();
++ return(1);
+ }
+ }
+
+@@ -1470,10 +1478,11 @@
+
+ if (!args->in_use) {
+ args->in_use = 1;
+- return(Mix_RegisterEffect(channel, f, _Eff_PositionDone, (void *) args));
++ retval=_Mix_RegisterEffect_locked(channel, f, _Eff_PositionDone, (void*)args);
+ }
+
+- return(1);
++ SDL_UnlockAudio();
++ return(retval);
+ }
+
+
+@@ -1483,23 +1492,30 @@
+ Uint16 format;
+ position_args *args = NULL;
+ int channels;
++ int retval = 1;
+
+ Mix_QuerySpec(NULL, &format, &channels);
+ f = get_position_effect_func(format, channels);
+ if (f == NULL)
+ return(0);
+
++ SDL_LockAudio();
+ args = get_position_arg(channel);
+- if (!args)
++ if (!args) {
++ SDL_UnlockAudio();
+ return(0);
++ }
+
+ distance = 255 - distance; /* flip it to our scale. */
+
+ /* it's a no-op; unregister the effect, if it's registered. */
+ if ((distance == 255) && (args->left_u8 == 255) && (args->right_u8 == 255)) {
+ if (args->in_use) {
+- return(Mix_UnregisterEffect(channel, f));
++ retval = _Mix_UnregisterEffect_locked(channel, f);
++ SDL_UnlockAudio();
++ return(retval);
+ } else {
++ SDL_UnlockAudio();
+ return(1);
+ }
+ }
+@@ -1508,10 +1524,11 @@
+ args->distance_f = ((float) distance) / 255.0f;
+ if (!args->in_use) {
+ args->in_use = 1;
+- return(Mix_RegisterEffect(channel, f, _Eff_PositionDone, (void *) args));
++ retval = _Mix_RegisterEffect_locked(channel, f, _Eff_PositionDone, (void *) args);
+ }
+
+- return(1);
++ SDL_UnlockAudio();
++ return(retval);
+ }
+
+
+@@ -1522,6 +1539,7 @@
+ int channels;
+ position_args *args = NULL;
+ Sint16 room_angle = 0;
++ int retval = 1;
+
+ Mix_QuerySpec(NULL, &format, &channels);
+ f = get_position_effect_func(format, channels);
+@@ -1530,17 +1548,23 @@
+
+ angle = SDL_abs(angle) % 360; /* make angle between 0 and 359. */
+
++ SDL_LockAudio();
+ args = get_position_arg(channel);
+- if (!args)
++ if (!args) {
++ SDL_UnlockAudio();
+ return(0);
++ }
+
+ /* it's a no-op; unregister the effect, if it's registered. */
+ if ((!distance) && (!angle)) {
+ if (args->in_use) {
+- return(Mix_UnregisterEffect(channel, f));
++ retval = _Mix_UnregisterEffect_locked(channel, f);
++ SDL_UnlockAudio();
++ return(retval);
+ } else {
+- return(1);
+- }
++ SDL_UnlockAudio();
++ return(1);
++ }
+ }
+
+ if (channels == 2)
+@@ -1581,10 +1605,11 @@
+ args->room_angle = room_angle;
+ if (!args->in_use) {
+ args->in_use = 1;
+- return(Mix_RegisterEffect(channel, f, _Eff_PositionDone, (void *) args));
++ retval = _Mix_RegisterEffect_locked(channel, f, _Eff_PositionDone, (void *) args);
+ }
+
+- return(1);
++ SDL_UnlockAudio();
++ return(retval);
+ }
+
+
+diff --git a/effects_internal.h b/effects_internal.h
+--- a/effects_internal.h
++++ b/effects_internal.h
+@@ -45,6 +45,12 @@
+ void _Mix_DeinitEffects(void);
+ void _Eff_PositionDeinit(void);
+
++int _Mix_RegisterEffect_locked(int channel, Mix_EffectFunc_t f,
++ Mix_EffectDone_t d, void *arg);
++int _Mix_UnregisterEffect_locked(int channel, Mix_EffectFunc_t f);
++int _Mix_UnregisterAllEffects_locked(int channel);
++
++
+ /* Set up for C function definitions, even when using C++ */
+ #ifdef __cplusplus
+ }
+diff --git a/mixer.c b/mixer.c
+--- a/mixer.c
++++ b/mixer.c
+@@ -1276,11 +1276,11 @@
+ }
+
+
+-int Mix_RegisterEffect(int channel, Mix_EffectFunc_t f,
++/* MAKE SURE you hold the audio lock (SDL_LockAudio()) before calling this! */
++int _Mix_RegisterEffect_locked(int channel, Mix_EffectFunc_t f,
+ Mix_EffectDone_t d, void *arg)
+ {
+ effect_info **e = NULL;
+- int retval;
+
+ if (channel == MIX_CHANNEL_POST) {
+ e = &posteffects;
+@@ -1292,17 +1292,24 @@
+ e = &mix_channel[channel].effects;
+ }
+
+- SDL_LockAudio();
+- retval = _Mix_register_effect(e, f, d, arg);
+- SDL_UnlockAudio();
+- return(retval);
++ return _Mix_register_effect(e, f, d, arg);
+ }
+
++int Mix_RegisterEffect(int channel, Mix_EffectFunc_t f,
++ Mix_EffectDone_t d, void *arg)
++{
++ int retval;
++ SDL_LockAudio();
++ retval = _Mix_RegisterEffect_locked(channel, f, d, arg);
++ SDL_UnlockAudio();
++ return retval;
++}
+
+-int Mix_UnregisterEffect(int channel, Mix_EffectFunc_t f)
++
++/* MAKE SURE you hold the audio lock (SDL_LockAudio()) before calling this! */
++int _Mix_UnregisterEffect_locked(int channel, Mix_EffectFunc_t f)
+ {
+ effect_info **e = NULL;
+- int retval;
+
+ if (channel == MIX_CHANNEL_POST) {
+ e = &posteffects;
+@@ -1314,17 +1321,22 @@
+ e = &mix_channel[channel].effects;
+ }
+
++ return _Mix_remove_effect(channel, e, f);
++}
++
++int Mix_UnregisterEffect(int channel, Mix_EffectFunc_t f)
++{
++ int retval;
+ SDL_LockAudio();
+- retval = _Mix_remove_effect(channel, e, f);
++ retval = _Mix_UnregisterEffect_locked(channel, f);
+ SDL_UnlockAudio();
+ return(retval);
+ }
+
+-
+-int Mix_UnregisterAllEffects(int channel)
++/* MAKE SURE you hold the audio lock (SDL_LockAudio()) before calling this! */
++int _Mix_UnregisterAllEffects_locked(int channel)
+ {
+ effect_info **e = NULL;
+- int retval;
+
+ if (channel == MIX_CHANNEL_POST) {
+ e = &posteffects;
+@@ -1336,8 +1348,14 @@
+ e = &mix_channel[channel].effects;
+ }
+
++ return _Mix_remove_all_effects(channel, e);
++}
++
++int Mix_UnregisterAllEffects(int channel)
++{
++ int retval;
+ SDL_LockAudio();
+- retval = _Mix_remove_all_effects(channel, e);
++ retval = _Mix_UnregisterAllEffects_locked(channel);
+ SDL_UnlockAudio();
+ return(retval);
+ }
+
Modified: unstable/sdl-mixer1.2/debian/patches/series
===================================================================
--- unstable/sdl-mixer1.2/debian/patches/series 2011-05-31 21:18:01 UTC (rev 269)
+++ unstable/sdl-mixer1.2/debian/patches/series 2011-11-20 23:17:27 UTC (rev 270)
@@ -9,3 +9,4 @@
220_mixer_segfaults.diff
04_timidity_cfg_opts.diff
05_fallback_to_freepats.diff
+230_racecondition_hg884a700fb3ff.diff
More information about the pkg-sdl-commits
mailing list