summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Horelick <jdhore@gentoo.org>2012-05-27 21:00:17 +0000
committerJeff Horelick <jdhore@gentoo.org>2012-05-27 21:00:17 +0000
commitf5f88928344df071a7b2eac73ea33b7f2930c302 (patch)
tree4f7e5f9ed568f6b571d5ad9fb727bca8a826049a /media-sound/audacious/files
parentNew munkres python module ebuild (diff)
downloadgentoo-2-f5f88928344df071a7b2eac73ea33b7f2930c302.tar.gz
gentoo-2-f5f88928344df071a7b2eac73ea33b7f2930c302.tar.bz2
gentoo-2-f5f88928344df071a7b2eac73ea33b7f2930c302.zip
Version bump and cleanups.
(Portage version: 2.2.0_alpha108/cvs/Linux i686)
Diffstat (limited to 'media-sound/audacious/files')
-rw-r--r--media-sound/audacious/files/audacious-3.2.3-fix-mutex.patch89
1 files changed, 89 insertions, 0 deletions
diff --git a/media-sound/audacious/files/audacious-3.2.3-fix-mutex.patch b/media-sound/audacious/files/audacious-3.2.3-fix-mutex.patch
new file mode 100644
index 000000000000..3fb209196f83
--- /dev/null
+++ b/media-sound/audacious/files/audacious-3.2.3-fix-mutex.patch
@@ -0,0 +1,89 @@
+commit b53935921298b8164f80454c2016bd40de29704b
+Author: John Lindgren <john.lindgren@aol.com>
+Date: Sat May 26 11:55:42 2012 -0400
+
+ Fix violation of mutex locking order (playback then playlist). Found by Helgrind.
+
+diff --git a/src/audacious/playlist-new.c b/src/audacious/playlist-new.c
+index 6407f64..596fbaa 100644
+--- a/src/audacious/playlist-new.c
++++ b/src/audacious/playlist-new.c
+@@ -822,6 +822,7 @@ void playlist_reorder (int from, int to, int count)
+
+ void playlist_delete (int playlist_num)
+ {
++ /* stop playback before locking playlists */
+ if (playback_get_playing () && playlist_num == playlist_get_playing ())
+ playback_stop ();
+
+@@ -969,6 +970,7 @@ int playlist_get_active (void)
+
+ void playlist_set_playing (int playlist_num)
+ {
++ /* stop playback before locking playlists */
+ if (playback_get_playing ())
+ playback_stop ();
+
+@@ -1112,6 +1114,7 @@ void playlist_entry_insert_batch_raw (int playlist_num, int at,
+
+ void playlist_entry_delete (int playlist_num, int at, int number)
+ {
++ /* stop playback before locking playlists */
+ if (playback_get_playing () && playlist_num == playlist_get_playing () &&
+ playlist_get_position (playlist_num) >= at && playlist_get_position
+ (playlist_num) < at + number)
+@@ -1225,6 +1228,7 @@ int playlist_entry_get_length (int playlist_num, int entry_num, bool_t fast)
+
+ void playlist_set_position (int playlist_num, int entry_num)
+ {
++ /* stop playback before locking playlists */
+ if (playback_get_playing () && playlist_num == playlist_get_playing ())
+ playback_stop ();
+
+@@ -1423,6 +1427,7 @@ int playlist_shift (int playlist_num, int entry_num, int distance)
+
+ void playlist_delete_selected (int playlist_num)
+ {
++ /* stop playback before locking playlists */
+ if (playback_get_playing () && playlist_num == playlist_get_playing () &&
+ playlist_get_position (playlist_num) >= 0 && playlist_entry_get_selected
+ (playlist_num, playlist_get_position (playlist_num)))
+@@ -2023,6 +2028,7 @@ static bool_t shuffle_prev (Playlist * playlist)
+
+ bool_t playlist_prev_song (int playlist_num)
+ {
++ /* stop playback before locking playlists */
+ if (playback_get_playing () && playlist_num == playlist_get_playing ())
+ playback_stop ();
+
+@@ -2110,6 +2116,7 @@ static void shuffle_reset (Playlist * playlist)
+
+ bool_t playlist_next_song (int playlist_num, bool_t repeat)
+ {
++ /* stop playback before locking playlists */
+ if (playback_get_playing () && playlist_num == playlist_get_playing ())
+ playback_stop ();
+
+@@ -2253,6 +2260,11 @@ int playback_entry_get_end_time (void)
+
+ void playlist_save_state (void)
+ {
++ /* get playback state before locking playlists */
++ resume_state = playback_get_playing () ? (playback_get_paused () ?
++ RESUME_PAUSE : RESUME_PLAY) : RESUME_STOP;
++ resume_time = playback_get_playing () ? playback_get_time () : 0;
++
+ ENTER;
+
+ char * path = g_strdup_printf ("%s/" STATE_FILE, get_path (AUD_PATH_USER_DIR));
+@@ -2261,10 +2273,6 @@ void playlist_save_state (void)
+ if (! handle)
+ LEAVE_RET_VOID;
+
+- resume_state = playback_get_playing () ? (playback_get_paused () ?
+- RESUME_PAUSE : RESUME_PLAY) : RESUME_STOP;
+- resume_time = playback_get_playing () ? playback_get_time () : 0;
+-
+ fprintf (handle, "resume-state %d\n", resume_state);
+ fprintf (handle, "resume-time %d\n", resume_time);
+