Update to mpd-0.18.11
This commit is contained in:
parent
5a2feacc3a
commit
9fc3168536
@ -1,7 +1,7 @@
|
||||
# $OpenBSD: Makefile,v 1.57 2014/05/06 10:49:23 dcoppa Exp $
|
||||
# $OpenBSD: Makefile,v 1.58 2014/05/19 07:52:07 dcoppa Exp $
|
||||
|
||||
COMMENT = Music Player Daemon
|
||||
DISTNAME = mpd-0.18.10
|
||||
DISTNAME = mpd-0.18.11
|
||||
CATEGORIES = audio
|
||||
HOMEPAGE = http://www.musicpd.org/
|
||||
MAINTAINER = David Coppa <dcoppa@openbsd.org>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (mpd-0.18.10.tar.gz) = ZoTtAYhbngbXPsIvZHPLCxfVmRa1ZrRqvjoc1Pnflsg=
|
||||
SIZE (mpd-0.18.10.tar.gz) = 804169
|
||||
SHA256 (mpd-0.18.11.tar.gz) = nEUETvFvdiOicGtsG0h8ueXFNilP+Cx3+MRa1ytvcsg=
|
||||
SIZE (mpd-0.18.11.tar.gz) = 804248
|
||||
|
@ -1,24 +0,0 @@
|
||||
$OpenBSD: patch-src_decoder_OggUtil_cxx,v 1.1 2014/05/06 10:49:23 dcoppa Exp $
|
||||
|
||||
commit 70bd35abe2ab774b70e37822f0200fcd4ebcd6c6
|
||||
Author: Max Kellermann <max@duempel.org>
|
||||
Date: Tue Apr 29 11:56:05 2014 +0200
|
||||
|
||||
decoder/OggUtil: allow skipping up to 32 kB after seek
|
||||
|
||||
Fixes missing song length on high-latency Opus files.
|
||||
|
||||
According to tests with 320 kbit/s opus files with 60ms packets, we
|
||||
need to skip up to 29 kB.
|
||||
|
||||
--- src/decoder/OggUtil.cxx.orig Tue May 6 12:27:40 2014
|
||||
+++ src/decoder/OggUtil.cxx Tue May 6 12:28:15 2014
|
||||
@@ -81,7 +81,7 @@ bool
|
||||
OggExpectPageSeek(ogg_sync_state &oy, ogg_page &page,
|
||||
Decoder *decoder, InputStream &input_stream)
|
||||
{
|
||||
- size_t remaining_skipped = 16384;
|
||||
+ size_t remaining_skipped = 32768;
|
||||
|
||||
while (true) {
|
||||
int r = ogg_sync_pageseek(&oy, &page);
|
@ -1,66 +0,0 @@
|
||||
$OpenBSD: patch-src_event_DeferredMonitor_cxx,v 1.1 2014/05/06 10:49:23 dcoppa Exp $
|
||||
|
||||
commit 0efb67b51e0d9d34c65bbdbd9df567a8a991cc4c
|
||||
Author: Max Kellermann <max@duempel.org>
|
||||
Date: Sat Apr 26 22:11:23 2014 +0200
|
||||
|
||||
DeferredMonitor: fix race condition when using GLib event loop
|
||||
|
||||
Turns out the lock-free code using atomics was not thread-safe. The
|
||||
given callback could be invoked by GLib before the source_id attribute
|
||||
was assigned. This commit changes the DeferredMonitor class to use
|
||||
a Mutex to block the event loop until source_id is assigned. This
|
||||
bug does not exist in the 0.19 branch because it does not use the
|
||||
GLib main loop anymore.
|
||||
|
||||
--- src/event/DeferredMonitor.cxx.orig Wed Dec 11 20:51:53 2013
|
||||
+++ src/event/DeferredMonitor.cxx Tue Apr 29 11:32:48 2014
|
||||
@@ -27,9 +27,11 @@ DeferredMonitor::Cancel()
|
||||
#ifdef USE_EPOLL
|
||||
pending = false;
|
||||
#else
|
||||
- const auto id = source_id.exchange(0);
|
||||
- if (id != 0)
|
||||
- g_source_remove(id);
|
||||
+ const ScopeLock protect(mutex);
|
||||
+ if (source_id != 0) {
|
||||
+ g_source_remove(source_id);
|
||||
+ source_id = 0;
|
||||
+ }
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -40,10 +42,9 @@ DeferredMonitor::Schedule()
|
||||
if (!pending.exchange(true))
|
||||
fd.Write();
|
||||
#else
|
||||
- const unsigned id = loop.AddIdle(Callback, this);
|
||||
- const auto old_id = source_id.exchange(id);
|
||||
- if (old_id != 0)
|
||||
- g_source_remove(old_id);
|
||||
+ const ScopeLock protect(mutex);
|
||||
+ if (source_id == 0)
|
||||
+ source_id = loop.AddIdle(Callback, this);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -65,9 +66,16 @@ DeferredMonitor::OnSocketReady(unsigned)
|
||||
void
|
||||
DeferredMonitor::Run()
|
||||
{
|
||||
- const auto id = source_id.exchange(0);
|
||||
- if (id != 0)
|
||||
- RunDeferred();
|
||||
+ {
|
||||
+ const ScopeLock protect(mutex);
|
||||
+ if (source_id == 0)
|
||||
+ /* cancelled */
|
||||
+ return;
|
||||
+
|
||||
+ source_id = 0;
|
||||
+ }
|
||||
+
|
||||
+ RunDeferred();
|
||||
}
|
||||
|
||||
gboolean
|
@ -1,36 +0,0 @@
|
||||
$OpenBSD: patch-src_event_DeferredMonitor_hxx,v 1.1 2014/05/06 10:49:23 dcoppa Exp $
|
||||
|
||||
commit 0efb67b51e0d9d34c65bbdbd9df567a8a991cc4c
|
||||
Author: Max Kellermann <max@duempel.org>
|
||||
Date: Sat Apr 26 22:11:23 2014 +0200
|
||||
|
||||
DeferredMonitor: fix race condition when using GLib event loop
|
||||
|
||||
Turns out the lock-free code using atomics was not thread-safe. The
|
||||
given callback could be invoked by GLib before the source_id attribute
|
||||
was assigned. This commit changes the DeferredMonitor class to use
|
||||
a Mutex to block the event loop until source_id is assigned. This
|
||||
bug does not exist in the 0.19 branch because it does not use the
|
||||
GLib main loop anymore.
|
||||
|
||||
--- src/event/DeferredMonitor.hxx.orig Wed Dec 11 20:51:53 2013
|
||||
+++ src/event/DeferredMonitor.hxx Tue Apr 29 11:32:48 2014
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "SocketMonitor.hxx"
|
||||
#include "WakeFD.hxx"
|
||||
#else
|
||||
+#include "thread/Mutex.hxx"
|
||||
#include <glib.h>
|
||||
#endif
|
||||
|
||||
@@ -48,7 +49,9 @@ class DeferredMonitor
|
||||
#else
|
||||
EventLoop &loop;
|
||||
|
||||
- std::atomic<guint> source_id;
|
||||
+ Mutex mutex;
|
||||
+
|
||||
+ guint source_id;
|
||||
#endif
|
||||
|
||||
public:
|
Loading…
Reference in New Issue
Block a user