Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a40510c241 | ||
![]() |
ac8dce6599 | ||
![]() |
190d525099 | ||
![]() |
1b6666fa39 | ||
![]() |
1dd01c99e8 | ||
![]() |
d50b30a498 | ||
![]() |
42a3a87f13 | ||
![]() |
9dfedbe619 | ||
![]() |
88957b4c9d | ||
![]() |
b2f2c9322b | ||
![]() |
3be2051808 | ||
![]() |
ff32b0dc9b | ||
![]() |
c1869a11af | ||
![]() |
e22a4fdba4 | ||
![]() |
29a7b2c5b5 | ||
![]() |
3b6c285c2a |
10
NEWS
10
NEWS
@@ -1,3 +1,13 @@
|
||||
ver 0.20.6 (2017/03/10)
|
||||
* input
|
||||
- curl: fix headers after HTTP redirect to Shoutcast server
|
||||
* decoder
|
||||
- ffmpeg: re-enable as fallback
|
||||
- mpcdec: fix crash (division by zero) after seeking
|
||||
- sidplay: make compatible with libsidplayfp < 1.8
|
||||
* fix stream tags after automatic song change
|
||||
* workaround for GCC 4.9.4 / libstdc++ bug (build failure)
|
||||
|
||||
ver 0.20.5 (2017/02/20)
|
||||
* tags
|
||||
- id3: fix memory leak on corrupt ID3 tags
|
||||
|
@@ -87,9 +87,14 @@ class AndroidNdkToolchain:
|
||||
self.is_armv7 = self.is_arm and 'armv7' in self.cflags
|
||||
self.is_windows = False
|
||||
|
||||
libstdcxx_path = os.path.join(ndk_path, 'sources/cxx-stl/gnu-libstdc++', gcc_version)
|
||||
libstdcxx_cppflags = '-isystem ' + os.path.join(libstdcxx_path, 'include') + ' -isystem ' + os.path.join(libstdcxx_path, 'libs', android_abi, 'include')
|
||||
libstdcxx_ldadd = os.path.join(libstdcxx_path, 'libs', android_abi, 'libgnustl_static.a')
|
||||
libcxx_path = os.path.join(ndk_path, 'sources/cxx-stl/llvm-libc++')
|
||||
libcxx_libs_path = os.path.join(libcxx_path, 'libs', android_abi)
|
||||
|
||||
libstdcxx_cppflags = '-nostdinc++ -isystem ' + os.path.join(libcxx_path, 'include') + ' -isystem ' + os.path.join(ndk_path, 'sources/android/support/include')
|
||||
libstdcxx_ldadd = os.path.join(libcxx_libs_path, 'libc++_static.a') + ' ' + os.path.join(libcxx_libs_path, 'libc++abi.a')
|
||||
|
||||
if self.is_armv7:
|
||||
libstdcxx_ldadd += ' ' + os.path.join(libcxx_libs_path, 'libunwind.a')
|
||||
|
||||
if use_cxx:
|
||||
self.libs += ' ' + libstdcxx_ldadd
|
||||
|
@@ -1,10 +1,10 @@
|
||||
AC_PREREQ(2.60)
|
||||
|
||||
AC_INIT(mpd, 0.20.5, musicpd-dev-team@lists.sourceforge.net)
|
||||
AC_INIT(mpd, 0.20.6, musicpd-dev-team@lists.sourceforge.net)
|
||||
|
||||
VERSION_MAJOR=0
|
||||
VERSION_MINOR=20
|
||||
VERSION_REVISION=5
|
||||
VERSION_REVISION=6
|
||||
VERSION_EXTRA=0
|
||||
|
||||
AC_CONFIG_SRCDIR([src/Main.cxx])
|
||||
|
@@ -141,9 +141,9 @@ Partition::OnMixerVolumeChanged(gcc_unused Mixer &mixer, gcc_unused int volume)
|
||||
void
|
||||
Partition::OnGlobalEvent(unsigned mask)
|
||||
{
|
||||
if ((mask & TAG_MODIFIED) != 0)
|
||||
TagModified();
|
||||
|
||||
if ((mask & SYNC_WITH_PLAYER) != 0)
|
||||
SyncWithPlayer();
|
||||
|
||||
if ((mask & TAG_MODIFIED) != 0)
|
||||
TagModified();
|
||||
}
|
||||
|
@@ -29,6 +29,29 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#define GLIBCXX_490 20140422
|
||||
#define GLIBCXX_491 20140716
|
||||
#define GLIBCXX_492 20141030
|
||||
#define GLIBCXX_492_Debian_9 20141220
|
||||
#define GLIBCXX_493 20150626
|
||||
#define GLIBCXX_494 20160803
|
||||
#define GLIBCXX_49X_NDK_r13b 20150123
|
||||
|
||||
/* the big mess attempts to detect whether we're compiling with
|
||||
libstdc++ 4.9.x; __GLIBCXX__ is a date tag and cannot be used to
|
||||
check the major version; and just checking the compiler version
|
||||
isn't enough, because somebody could use an old libstdc++ with
|
||||
clang - SIGH! */
|
||||
#if GCC_OLDER_THAN(5,0) || (defined(__GLIBCXX__) && \
|
||||
(__GLIBCXX__ == GLIBCXX_490 || __GLIBCXX__ == GLIBCXX_491 || \
|
||||
__GLIBCXX__ == GLIBCXX_492 || \
|
||||
__GLIBCXX__ == GLIBCXX_492_Debian_9 || \
|
||||
__GLIBCXX__ == GLIBCXX_493 || \
|
||||
__GLIBCXX__ == GLIBCXX_494 || \
|
||||
__GLIBCXX__ == GLIBCXX_49X_NDK_r13b))
|
||||
#define GLIBCXX_49X
|
||||
#endif
|
||||
|
||||
gcc_const
|
||||
static enum ack
|
||||
ToAck(PlaylistResult result)
|
||||
@@ -100,13 +123,13 @@ ToAck(std::exception_ptr ep)
|
||||
return ACK_ERROR_SYSTEM;
|
||||
} catch (const std::invalid_argument &e) {
|
||||
return ACK_ERROR_ARG;
|
||||
#if defined(__GLIBCXX__) && __GLIBCXX__ < 20151204
|
||||
#ifdef GLIBCXX_49X
|
||||
} catch (const std::exception &e) {
|
||||
#else
|
||||
} catch (...) {
|
||||
#endif
|
||||
try {
|
||||
#if defined(__GLIBCXX__) && __GLIBCXX__ < 20151204
|
||||
#ifdef GLIBCXX_49X
|
||||
/* workaround for g++ 4.x: no overload for
|
||||
rethrow_exception(exception_ptr) */
|
||||
std::rethrow_if_nested(e);
|
||||
|
@@ -25,6 +25,13 @@
|
||||
#include "db/Interface.hxx"
|
||||
#include "fs/Traits.hxx"
|
||||
|
||||
#ifdef _LIBCPP_VERSION
|
||||
/* workaround for "error: incomplete type 'PlaylistInfo' used in type
|
||||
trait expression" with libc++ version 3900 (from Android NDK
|
||||
r13b) */
|
||||
#include "db/PlaylistInfo.hxx"
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
struct PrefixedLightDirectory : LightDirectory {
|
||||
|
@@ -235,7 +235,7 @@ decoder_run_stream_fallback(DecoderBridge &bridge, InputStream &is)
|
||||
{
|
||||
const struct DecoderPlugin *plugin;
|
||||
|
||||
#ifdef HAVE_FFMPEG
|
||||
#ifdef ENABLE_FFMPEG
|
||||
plugin = decoder_plugin_from_name("ffmpeg");
|
||||
#else
|
||||
plugin = decoder_plugin_from_name("mad");
|
||||
|
@@ -207,6 +207,15 @@ mpcdec_decode(DecoderClient &client, InputStream &is)
|
||||
if (frame.bits == -1)
|
||||
break;
|
||||
|
||||
if (frame.samples <= 0) {
|
||||
/* empty frame - this has been observed to
|
||||
happen spuriously after seeking; skip this
|
||||
obscure frame, and hope libmpcdec
|
||||
recovers */
|
||||
cmd = client.GetCommand();
|
||||
continue;
|
||||
}
|
||||
|
||||
mpc_uint32_t ret = frame.samples;
|
||||
ret *= info.channels;
|
||||
|
||||
|
@@ -50,6 +50,10 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef HAVE_SIDPLAYFP
|
||||
#define LIBSIDPLAYFP_VERSION GCC_MAKE_VERSION(LIBSIDPLAYFP_VERSION_MAJ, LIBSIDPLAYFP_VERSION_MIN, LIBSIDPLAYFP_VERSION_LEV)
|
||||
#endif
|
||||
|
||||
#define SUBTUNE_PREFIX "tune_"
|
||||
|
||||
static constexpr Domain sidplay_domain("sidplay");
|
||||
@@ -285,7 +289,11 @@ sidplay_file_decode(DecoderClient &client, Path path_fs)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SIDPLAYFP
|
||||
#if LIBSIDPLAYFP_VERSION >= GCC_MAKE_VERSION(1,8,0)
|
||||
const bool stereo = tune.getInfo()->sidChips() >= 2;
|
||||
#else
|
||||
const bool stereo = tune.getInfo()->isStereo();
|
||||
#endif
|
||||
#else
|
||||
const bool stereo = tune.isStereo();
|
||||
#endif
|
||||
|
@@ -34,6 +34,8 @@
|
||||
#include <stdexcept>
|
||||
#include <memory>
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#define ERRORLEN 80
|
||||
|
@@ -398,7 +398,12 @@ CurlInputStream::SeekInternal(offset_type new_offset)
|
||||
/* send the "Range" header */
|
||||
|
||||
if (offset > 0) {
|
||||
sprintf(range, "%lld-", (long long)offset);
|
||||
#ifdef WIN32
|
||||
// TODO: what can we use on Windows to format 64 bit?
|
||||
sprintf(range, "%lu-", (long)offset);
|
||||
#else
|
||||
sprintf(range, "%llu-", (unsigned long long)offset);
|
||||
#endif
|
||||
request->SetOption(CURLOPT_RANGE, range);
|
||||
}
|
||||
}
|
||||
|
@@ -168,13 +168,23 @@ CurlRequest::Done(CURLcode result)
|
||||
}
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
static bool
|
||||
IsResponseBoundaryHeader(StringView s)
|
||||
{
|
||||
return s.size > 5 && (memcmp(s.data, "HTTP/", 5) == 0 ||
|
||||
/* the proprietary "ICY 200 OK" is
|
||||
emitted by Shoutcast */
|
||||
memcmp(s.data, "ICY 2", 5) == 0);
|
||||
}
|
||||
|
||||
inline void
|
||||
CurlRequest::HeaderFunction(StringView s)
|
||||
{
|
||||
if (state > State::HEADERS)
|
||||
return;
|
||||
|
||||
if (s.size > 5 && memcmp(s.data, "HTTP/", 5) == 0) {
|
||||
if (IsResponseBoundaryHeader(s)) {
|
||||
/* this is the boundary to a new response, for example
|
||||
after a redirect */
|
||||
headers.clear();
|
||||
|
@@ -48,7 +48,7 @@ static size_t
|
||||
AlignToPageSize(size_t size)
|
||||
{
|
||||
static const long page_size = sysconf(_SC_PAGESIZE);
|
||||
if (page_size == 0)
|
||||
if (page_size <= 0)
|
||||
return size;
|
||||
|
||||
size_t ps(page_size);
|
||||
|
@@ -56,7 +56,7 @@ public:
|
||||
:buffer(std::exchange(src.buffer, nullptr)),
|
||||
capacity(std::exchange(src.capacity, 0)) {}
|
||||
|
||||
ReusableArray &operator=(const ReusableArray &&src) {
|
||||
ReusableArray &operator=(ReusableArray &&src) {
|
||||
std::swap(buffer, src.buffer);
|
||||
std::swap(capacity, src.capacity);
|
||||
return *this;
|
||||
|
Reference in New Issue
Block a user