diff --git a/audacious-plugins-1.5.1-mixer-not-ready.patch b/audacious-plugins-1.5.1-mixer-not-ready.patch index a22c37f..88697c4 100644 --- a/audacious-plugins-1.5.1-mixer-not-ready.patch +++ b/audacious-plugins-1.5.1-mixer-not-ready.patch @@ -1,6 +1,6 @@ -diff -Nur audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-core.c audacious-plugins-fedora-1.5.1/src/alsa/alsa-core.c ---- audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-core.c 2009-06-29 18:01:20.000000000 +0200 -+++ audacious-plugins-fedora-1.5.1/src/alsa/alsa-core.c 2009-06-29 20:12:36.000000000 +0200 +diff -Nur audacious-plugins-1.5.1-alsa-ng/src/alsa/alsa-core.c audacious-plugins-1.5.1-alsa-ng2/src/alsa/alsa-core.c +--- audacious-plugins-1.5.1-alsa-ng/src/alsa/alsa-core.c 2009-06-29 18:01:20.000000000 +0200 ++++ audacious-plugins-1.5.1-alsa-ng2/src/alsa/alsa-core.c 2009-07-02 10:45:48.000000000 +0200 @@ -45,6 +45,7 @@ static snd_mixer_t *amixer = NULL; @@ -9,7 +9,16 @@ diff -Nur audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-core.c audacious- static snd_mixer_elem_t * alsaplug_get_mixer_elem_by_name(snd_mixer_t *mixer, gchar *name) -@@ -140,6 +141,8 @@ +@@ -75,6 +76,8 @@ + gint i; + snd_mixer_elem_t *elem; + ++ if (!mixer_ready) ++ return NULL; + if (alsaplug_cfg.mixer_device != NULL) + return alsaplug_get_mixer_elem_by_name(mixer, alsaplug_cfg.mixer_device); + +@@ -140,6 +143,8 @@ { snd_mixer_elem_t *elem = alsaplug_guess_mixer_elem(amixer); @@ -18,15 +27,12 @@ diff -Nur audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-core.c audacious- if (elem == NULL) return; -@@ -172,6 +175,11 @@ +@@ -172,6 +177,8 @@ { snd_mixer_elem_t *elem = alsaplug_guess_mixer_elem(amixer); + *l = mixer_left; + *r = mixer_right; -+ if (!mixer_ready) { -+ return; -+ } if (elem == NULL) return; diff --git a/audacious-plugins.spec b/audacious-plugins.spec index 8675571..0fbac49 100644 --- a/audacious-plugins.spec +++ b/audacious-plugins.spec @@ -4,7 +4,7 @@ Name: audacious-plugins Version: 1.5.1 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Plugins for the Audacious media player Group: Applications/Multimedia @@ -272,6 +272,9 @@ update-desktop-database &> /dev/null || : %changelog +* Thu Jul 2 2009 Michael Schwendt - 1.5.1-10 +- Prevent alsalib mixer crash if mixer isn't ready. + * Mon Jun 29 2009 Michael Schwendt - 1.5.1-9 - Use old "ALSA" plugin id for config file. - Keep old mixer level even if mixer isn't ready.