[timidity++] fix segfault in detect() introduced by libao-first patch (#711224)
Jindrich Novy
jnovy at fedoraproject.org
Wed Jul 27 13:34:25 UTC 2011
commit 66ca53251d6e095ea5c6a9bb938f10315eb93824
Author: Jindrich Novy <jnovy at redhat.com>
Date: Wed Jul 27 15:33:17 2011 +0200
fix segfault in detect() introduced by libao-first patch (#711224)
TiMidity++-2.13.2-libao-first.patch | 63 ++++++++++++++++++-----------------
timidity++.spec | 5 ++-
2 files changed, 36 insertions(+), 32 deletions(-)
---
diff --git a/TiMidity++-2.13.2-libao-first.patch b/TiMidity++-2.13.2-libao-first.patch
index 36d0427..445401a 100644
--- a/TiMidity++-2.13.2-libao-first.patch
+++ b/TiMidity++-2.13.2-libao-first.patch
@@ -1,32 +1,7 @@
-diff -up TiMidity++-2.13.2/timidity/output.c~ TiMidity++-2.13.2/timidity/output.c
---- TiMidity++-2.13.2/timidity/output.c~ 2007-12-10 16:55:05.000000000 +0100
-+++ TiMidity++-2.13.2/timidity/output.c 2007-12-10 16:55:05.000000000 +0100
-@@ -133,6 +133,10 @@ extern PlayMode gogo_play_mode;
- extern PlayMode modmidi_play_mode;
-
- PlayMode *play_mode_list[] = {
-+#if defined(AU_AO) /* Try libao first as that will give us pulseaudio */
-+ &ao_play_mode,
-+#endif /* AU_AO */
-+
- #if defined(AU_ARTS)
- &arts_play_mode,
- #endif /* AU_ARTS */
-@@ -171,10 +175,6 @@ PlayMode *play_mode_list[] = {
- &nas_play_mode,
- #endif /* AU_NAS */
-
--#if defined(AU_AO)
-- &ao_play_mode,
--#endif /* AU_PORTAUDIO */
--
- #ifndef __MACOS__
- &wave_play_mode,
- &raw_play_mode,
-diff -ur TiMidity++-2.13.2/timidity/ao_a.c TiMidity++-2.13.2.new/timidity/ao_a.c
---- TiMidity++-2.13.2/timidity/ao_a.c 2004-04-12 19:44:03.000000000 +0200
-+++ TiMidity++-2.13.2.new/timidity/ao_a.c 2007-12-10 20:28:14.000000000 +0100
-@@ -42,6 +42,7 @@
+diff -up TiMidity++-2.13.2/timidity/ao_a.c.libao-first TiMidity++-2.13.2/timidity/ao_a.c
+--- TiMidity++-2.13.2/timidity/ao_a.c.libao-first 2004-04-12 19:44:03.000000000 +0200
++++ TiMidity++-2.13.2/timidity/ao_a.c 2011-07-27 15:19:56.417477616 +0200
+@@ -42,6 +42,7 @@ static int open_output(void); /* 0=succe
static void close_output(void);
static int output_data(char *buf, int32 nbytes);
static int acntl(int request, void *arg);
@@ -34,7 +9,7 @@ diff -ur TiMidity++-2.13.2/timidity/ao_a.c TiMidity++-2.13.2.new/timidity/ao_a.c
/* export the playback mode */
-@@ -56,7 +57,8 @@
+@@ -56,7 +57,8 @@ PlayMode dpm = {
open_output,
close_output,
output_data,
@@ -44,7 +19,7 @@ diff -ur TiMidity++-2.13.2/timidity/ao_a.c TiMidity++-2.13.2.new/timidity/ao_a.c
};
static ao_device *ao_device_ctx;
-@@ -167,3 +169,29 @@
+@@ -167,3 +169,30 @@ static int acntl(int request, void *arg)
}
return -1;
}
@@ -64,6 +39,7 @@ diff -ur TiMidity++-2.13.2/timidity/ao_a.c TiMidity++-2.13.2.new/timidity/ao_a.c
+ ao_sample_format_ctx.bits = 16;
+ ao_sample_format_ctx.channels = 2;
+ ao_sample_format_ctx.byte_format = AO_FMT_NATIVE;
++ ao_sample_format_ctx.matrix = NULL;
+
+ if ((ao_device_ctx = ao_open_live(driver_id, &ao_sample_format_ctx, NULL))) {
+ result = 1;
@@ -74,3 +50,28 @@ diff -ur TiMidity++-2.13.2/timidity/ao_a.c TiMidity++-2.13.2.new/timidity/ao_a.c
+
+ return result;
+}
+diff -up TiMidity++-2.13.2/timidity/output.c.libao-first TiMidity++-2.13.2/timidity/output.c
+--- TiMidity++-2.13.2/timidity/output.c.libao-first 2011-07-27 15:19:40.445447885 +0200
++++ TiMidity++-2.13.2/timidity/output.c 2011-07-27 15:19:40.468447928 +0200
+@@ -133,6 +133,10 @@ extern PlayMode gogo_play_mode;
+ extern PlayMode modmidi_play_mode;
+
+ PlayMode *play_mode_list[] = {
++#if defined(AU_AO) /* Try libao first as that will give us pulseaudio */
++ &ao_play_mode,
++#endif /* AU_AO */
++
+ #if defined(AU_ARTS)
+ &arts_play_mode,
+ #endif /* AU_ARTS */
+@@ -171,10 +175,6 @@ PlayMode *play_mode_list[] = {
+ &nas_play_mode,
+ #endif /* AU_NAS */
+
+-#if defined(AU_AO)
+- &ao_play_mode,
+-#endif /* AU_PORTAUDIO */
+-
+ #ifndef __MACOS__
+ &wave_play_mode,
+ &raw_play_mode,
diff --git a/timidity++.spec b/timidity++.spec
index 784d011..68d460d 100644
--- a/timidity++.spec
+++ b/timidity++.spec
@@ -1,7 +1,7 @@
Summary: A software wavetable MIDI synthesizer
Name: timidity++
Version: 2.13.2
-Release: 23%{?dist}
+Release: 24%{?dist}
Group: Applications/Multimedia
Source: http://downloads.sourceforge.net/timidity/TiMidity++-%{version}.tar.bz2
Source1: fedora-timidity.desktop
@@ -115,6 +115,9 @@ fi
%changelog
+* Wed Jul 27 2011 Jindrich Novy <jnovy at redhat.com> - 2.13.2-24
+- fix segfault in detect() introduced by libao-first patch (#711224)
+
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.13.2-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
More information about the scm-commits
mailing list