Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0bf052fa9 | ||
|
|
5419cff925 | ||
|
|
eee10ad2ed | ||
|
|
98472a8104 | ||
|
|
d094c168aa | ||
|
|
4b18460bc6 | ||
|
|
412c0a965c | ||
|
|
2becf79223 | ||
|
|
43ec96d4a0 | ||
|
|
3d1d779da7 | ||
|
|
c88056ba83 | ||
|
|
e769751221 |
8
NEWS
8
NEWS
@@ -1,3 +1,11 @@
|
||||
ver 0.20.14 (2018/01/01)
|
||||
* database
|
||||
- simple: fix file corruption in the presence of mount points
|
||||
* archive
|
||||
- bz2: fix deadlock
|
||||
- reduce lock contention, fixing lots of xrun problems
|
||||
* fix Solaris build failure
|
||||
|
||||
ver 0.20.13 (2017/12/18)
|
||||
* output
|
||||
- osx: set up ring buffer to hold at least 100ms
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
AC_PREREQ(2.60)
|
||||
|
||||
AC_INIT(mpd, 0.20.13, musicpd-dev-team@lists.sourceforge.net)
|
||||
AC_INIT(mpd, 0.20.14, musicpd-dev-team@lists.sourceforge.net)
|
||||
|
||||
VERSION_MAJOR=0
|
||||
VERSION_MINOR=20
|
||||
VERSION_REVISION=13
|
||||
VERSION_REVISION=14
|
||||
VERSION_EXTRA=0
|
||||
|
||||
AC_CONFIG_SRCDIR([src/Main.cxx])
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
<para>
|
||||
<varname>musicbrainz_artistid</varname>: the artist id in the
|
||||
<ulink
|
||||
url="http://musicbrainz.org/doc/MusicBrainzTag">MusicBrainz</ulink>
|
||||
url="https://picard.musicbrainz.org/docs/mappings/">MusicBrainz</ulink>
|
||||
database.
|
||||
</para>
|
||||
</listitem>
|
||||
@@ -122,7 +122,7 @@
|
||||
<para>
|
||||
<varname>musicbrainz_albumid</varname>: the album id in the
|
||||
<ulink
|
||||
url="http://musicbrainz.org/doc/MusicBrainzTag">MusicBrainz</ulink>
|
||||
url="https://picard.musicbrainz.org/docs/mappings/">MusicBrainz</ulink>
|
||||
database.
|
||||
</para>
|
||||
</listitem>
|
||||
@@ -131,7 +131,7 @@
|
||||
<para>
|
||||
<varname>musicbrainz_albumartistid</varname>: the album artist
|
||||
id in the <ulink
|
||||
url="http://musicbrainz.org/doc/MusicBrainzTag">MusicBrainz</ulink>
|
||||
url="https://picard.musicbrainz.org/docs/mappings/">MusicBrainz</ulink>
|
||||
database.
|
||||
</para>
|
||||
</listitem>
|
||||
@@ -140,7 +140,7 @@
|
||||
<para>
|
||||
<varname>musicbrainz_trackid</varname>: the track id in the
|
||||
<ulink
|
||||
url="http://musicbrainz.org/doc/MusicBrainzTag">MusicBrainz</ulink>
|
||||
url="https://picard.musicbrainz.org/docs/mappings/">MusicBrainz</ulink>
|
||||
database.
|
||||
</para>
|
||||
</listitem>
|
||||
@@ -149,7 +149,7 @@
|
||||
<para>
|
||||
<varname>musicbrainz_releasetrackid</varname>: the release track
|
||||
id in the <ulink
|
||||
url="http://musicbrainz.org/doc/MusicBrainzTag">MusicBrainz</ulink>
|
||||
url="https://picard.musicbrainz.org/docs/mappings/">MusicBrainz</ulink>
|
||||
database.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
@@ -162,7 +162,7 @@ Bzip2InputStream::FillBuffer()
|
||||
if (bzstream.avail_in > 0)
|
||||
return true;
|
||||
|
||||
size_t count = archive->istream->Read(buffer, sizeof(buffer));
|
||||
size_t count = archive->istream->LockRead(buffer, sizeof(buffer));
|
||||
if (count == 0)
|
||||
return false;
|
||||
|
||||
@@ -174,6 +174,8 @@ Bzip2InputStream::FillBuffer()
|
||||
size_t
|
||||
Bzip2InputStream::Read(void *ptr, size_t length)
|
||||
{
|
||||
const ScopeUnlock unlock(mutex);
|
||||
|
||||
int bz_result;
|
||||
size_t nbytes = 0;
|
||||
|
||||
@@ -224,4 +226,3 @@ const ArchivePlugin bz2_archive_plugin = {
|
||||
bz2_open,
|
||||
bz2_extensions,
|
||||
};
|
||||
|
||||
|
||||
@@ -182,6 +182,8 @@ Iso9660ArchiveFile::OpenStream(const char *pathname,
|
||||
size_t
|
||||
Iso9660InputStream::Read(void *ptr, size_t read_size)
|
||||
{
|
||||
const ScopeUnlock unlock(mutex);
|
||||
|
||||
int readed = 0;
|
||||
int no_blocks, cur_block;
|
||||
size_t left_bytes = statbuf->size - offset;
|
||||
|
||||
@@ -138,6 +138,8 @@ ZzipArchiveFile::OpenStream(const char *pathname,
|
||||
size_t
|
||||
ZzipInputStream::Read(void *ptr, size_t read_size)
|
||||
{
|
||||
const ScopeUnlock unlock(mutex);
|
||||
|
||||
int ret = zzip_file_read(file, ptr, read_size);
|
||||
if (ret < 0)
|
||||
throw std::runtime_error("zzip_file_read() has failed");
|
||||
@@ -155,6 +157,8 @@ ZzipInputStream::IsEOF() noexcept
|
||||
void
|
||||
ZzipInputStream::Seek(offset_type new_offset)
|
||||
{
|
||||
const ScopeUnlock unlock(mutex);
|
||||
|
||||
zzip_off_t ofs = zzip_seek(file, new_offset, SEEK_SET);
|
||||
if (ofs < 0)
|
||||
throw std::runtime_error("zzip_seek() has failed");
|
||||
|
||||
@@ -123,6 +123,10 @@ ToAck(std::exception_ptr ep) noexcept
|
||||
return ACK_ERROR_SYSTEM;
|
||||
} catch (const std::invalid_argument &e) {
|
||||
return ACK_ERROR_ARG;
|
||||
} catch (const std::length_error &e) {
|
||||
return ACK_ERROR_ARG;
|
||||
} catch (const std::out_of_range &e) {
|
||||
return ACK_ERROR_ARG;
|
||||
#ifdef GLIBCXX_49X
|
||||
} catch (const std::exception &e) {
|
||||
#else
|
||||
|
||||
@@ -82,10 +82,11 @@ directory_save(BufferedOutputStream &os, const Directory &directory)
|
||||
}
|
||||
|
||||
for (const auto &child : directory.children) {
|
||||
os.Format(DIRECTORY_DIR "%s\n", child.GetName());
|
||||
if (child.IsMount())
|
||||
continue;
|
||||
|
||||
if (!child.IsMount())
|
||||
directory_save(os, child);
|
||||
os.Format(DIRECTORY_DIR "%s\n", child.GetName());
|
||||
directory_save(os, child);
|
||||
}
|
||||
|
||||
for (const auto &song : directory.songs)
|
||||
|
||||
@@ -266,6 +266,7 @@ CurlInputStream::OnData(ConstBuffer<void> data)
|
||||
void
|
||||
CurlInputStream::OnEnd()
|
||||
{
|
||||
const std::lock_guard<Mutex> protect(mutex);
|
||||
cond.broadcast();
|
||||
|
||||
AsyncInputStream::SetClosed();
|
||||
@@ -274,6 +275,7 @@ CurlInputStream::OnEnd()
|
||||
void
|
||||
CurlInputStream::OnError(std::exception_ptr e)
|
||||
{
|
||||
const std::lock_guard<Mutex> protect(mutex);
|
||||
postponed_exception = std::move(e);
|
||||
|
||||
if (IsSeekPending())
|
||||
|
||||
@@ -122,7 +122,7 @@ sample_format_size(SampleFormat format)
|
||||
* @param format a #SampleFormat enum value
|
||||
* @return the string
|
||||
*/
|
||||
gcc_pure gcc_malloc
|
||||
gcc_pure
|
||||
const char *
|
||||
sample_format_to_string(SampleFormat format) noexcept;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "IOThread.hxx"
|
||||
#include "Log.hxx"
|
||||
|
||||
#include <list>
|
||||
#include <set>
|
||||
#include <boost/crc.hpp>
|
||||
|
||||
#define MOUNT_STATE_BEGIN "mount_begin"
|
||||
@@ -118,16 +118,14 @@ storage_state_restore(const char *line, TextFile &file, Instance &instance)
|
||||
unsigned
|
||||
storage_state_get_hash(const Instance &instance)
|
||||
{
|
||||
std::list<std::string> mounts;
|
||||
std::set<std::string> mounts;
|
||||
|
||||
const auto visitor = [&mounts](const char *mount_uri, const Storage &storage) {
|
||||
mounts.push_back(std::string(mount_uri) + ":" + storage.MapUTF8(""));
|
||||
mounts.emplace(std::string(mount_uri) + ":" + storage.MapUTF8(""));
|
||||
};
|
||||
|
||||
((CompositeStorage*)instance.storage)->VisitMounts(visitor);
|
||||
|
||||
mounts.sort();
|
||||
|
||||
boost::crc_32_type result;
|
||||
|
||||
for (auto mount: mounts) {
|
||||
|
||||
@@ -103,11 +103,13 @@ UnsafeCopyStringP(wchar_t *dest, const wchar_t *src) noexcept
|
||||
{
|
||||
#if defined(_WIN32) || defined(__BIONIC__) || defined(__OpenBSD__) || \
|
||||
defined(__NetBSD__)
|
||||
/* emulate wcpcpy() */
|
||||
UnsafeCopyString(dest, src);
|
||||
return dest + StringLength(dest);
|
||||
/* emulate wcpcpy() */
|
||||
UnsafeCopyString(dest, src);
|
||||
return dest + StringLength(dest);
|
||||
#elif defined(__sun) && defined (__SVR4)
|
||||
return std::wcpcpy(dest, src);
|
||||
#else
|
||||
return wcpcpy(dest, src);
|
||||
return wcpcpy(dest, src);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -140,7 +142,11 @@ gcc_malloc gcc_nonnull_all
|
||||
static inline wchar_t *
|
||||
DuplicateString(const wchar_t *p)
|
||||
{
|
||||
#if defined(__sun) && defined (__SVR4)
|
||||
return std::wcsdup(p);
|
||||
#else
|
||||
return wcsdup(p);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user