Hello community,

here is the log from the commit of package mpd for openSUSE:Factory checked in 
at 2018-02-26 23:26:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mpd (Old)
 and      /work/SRC/openSUSE:Factory/.mpd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mpd"

Mon Feb 26 23:26:06 2018 rev:4 rq:580063 version:0.20.18

Changes:
--------
--- /work/SRC/openSUSE:Factory/mpd/mpd.changes  2018-02-12 10:15:43.288410130 
+0100
+++ /work/SRC/openSUSE:Factory/.mpd.new/mpd.changes     2018-02-26 
23:26:10.244135743 +0100
@@ -1,0 +2,10 @@
+Sun Feb 25 09:45:09 UTC 2018 - [email protected]
+
+- Update to version 0.20.18:
+  * input
+    - curl: allow authentication methods other than "Basic"
+  * decoder
+    - flac: improve seeking precision
+  * fix gapless CUE song transitions
+
+-------------------------------------------------------------------

Old:
----
  mpd-0.20.17.tar.xz

New:
----
  mpd-0.20.18.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mpd.spec ++++++
--- /var/tmp/diff_new_pack.wbLCwC/_old  2018-02-26 23:26:12.564052308 +0100
+++ /var/tmp/diff_new_pack.wbLCwC/_new  2018-02-26 23:26:12.568052164 +0100
@@ -23,10 +23,10 @@
 %define _userunitdir %{_prefix}/lib/systemd/user
 %endif
 Name:           mpd
-Version:        0.20.17
+Version:        0.20.18
 Release:        0
 Summary:        Music Player Daemon
-License:        GPL-3.0+
+License:        GPL-3.0-or-later
 Group:          Productivity/Multimedia/Sound/Players
 Url:            https://www.musicpd.org/
 Source:         https://www.musicpd.org/download/mpd/0.20/mpd-%{version}.tar.xz

++++++ mpd-0.20.17.tar.xz -> mpd-0.20.18.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/Makefile.am new/mpd-0.20.18/Makefile.am
--- old/mpd-0.20.17/Makefile.am 2018-01-23 16:31:35.000000000 +0100
+++ new/mpd-0.20.18/Makefile.am 2018-02-24 22:45:09.000000000 +0100
@@ -497,6 +497,7 @@
 
 libnet_a_SOURCES = \
        src/net/Features.hxx \
+       src/net/Init.hxx \
        src/net/ToString.cxx src/net/ToString.hxx \
        src/net/Resolver.cxx src/net/Resolver.hxx \
        src/net/StaticSocketAddress.cxx src/net/StaticSocketAddress.hxx \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/Makefile.in new/mpd-0.20.18/Makefile.in
--- old/mpd-0.20.17/Makefile.in 2018-02-09 18:43:51.000000000 +0100
+++ new/mpd-0.20.18/Makefile.in 2018-02-24 22:50:18.000000000 +0100
@@ -3523,6 +3523,7 @@
 # Networking library
 libnet_a_SOURCES = \
        src/net/Features.hxx \
+       src/net/Init.hxx \
        src/net/ToString.cxx src/net/ToString.hxx \
        src/net/Resolver.cxx src/net/Resolver.hxx \
        src/net/StaticSocketAddress.cxx src/net/StaticSocketAddress.hxx \
@@ -15613,9 +15614,9 @@
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
        -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+@ENABLE_DOCUMENTATION_FALSE@install-data-local:
 @ANDROID_FALSE@@ENABLE_DOCUMENTATION_FALSE@@ENABLE_HAIKU_FALSE@clean-local:
 @ENABLE_DOCUMENTATION_FALSE@uninstall-local:
-@ENABLE_DOCUMENTATION_FALSE@install-data-local:
 clean: clean-am
 
 clean-am: clean-binPROGRAMS clean-generic clean-local \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/NEWS new/mpd-0.20.18/NEWS
--- old/mpd-0.20.17/NEWS        2018-02-11 13:02:53.000000000 +0100
+++ new/mpd-0.20.18/NEWS        2018-02-24 23:03:24.000000000 +0100
@@ -1,3 +1,12 @@
+ver 0.20.18 (2018/02/24)
+* input
+  - curl: allow authentication methods other than "Basic"
+* decoder
+  - flac: improve seeking precision
+* fix gapless CUE song transitions
+* Android, Windows
+  - enable the NFS storage plugin
+
 ver 0.20.17 (2018/02/11)
 * output
   - alsa: fix crash bug with 8 channels
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/android/AndroidManifest.xml 
new/mpd-0.20.18/android/AndroidManifest.xml
--- old/mpd-0.20.17/android/AndroidManifest.xml 2018-02-09 23:14:31.000000000 
+0100
+++ new/mpd-0.20.18/android/AndroidManifest.xml 2018-02-17 01:22:05.000000000 
+0100
@@ -2,8 +2,8 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android";
           package="org.musicpd"
           android:installLocation="auto"
-          android:versionCode="16"
-          android:versionName="0.20.17">
+          android:versionCode="17"
+          android:versionName="0.20.18">
 
   <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17"/>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/android/build.py 
new/mpd-0.20.18/android/build.py
--- old/mpd-0.20.17/android/build.py    2018-02-09 23:59:30.000000000 +0100
+++ new/mpd-0.20.18/android/build.py    2018-02-24 23:02:42.000000000 +0100
@@ -124,9 +124,9 @@
     opus,
     flac,
     libid3tag,
-    libmad,
     ffmpeg,
     curl,
+    libnfs,
     boost,
 ]
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/configure new/mpd-0.20.18/configure
--- old/mpd-0.20.17/configure   2018-02-09 18:43:50.000000000 +0100
+++ new/mpd-0.20.18/configure   2018-02-17 01:22:27.000000000 +0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for mpd 0.20.17.
+# Generated by GNU Autoconf 2.69 for mpd 0.20.18.
 #
 # Report bugs to <[email protected]>.
 #
@@ -580,8 +580,8 @@
 # Identity of this package.
 PACKAGE_NAME='mpd'
 PACKAGE_TARNAME='mpd'
-PACKAGE_VERSION='0.20.17'
-PACKAGE_STRING='mpd 0.20.17'
+PACKAGE_VERSION='0.20.18'
+PACKAGE_STRING='mpd 0.20.18'
 PACKAGE_BUGREPORT='[email protected]'
 PACKAGE_URL=''
 
@@ -1785,7 +1785,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures mpd 0.20.17 to adapt to many kinds of systems.
+\`configure' configures mpd 0.20.18 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1856,7 +1856,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of mpd 0.20.17:";;
+     short | recursive ) echo "Configuration of mpd 0.20.18:";;
    esac
   cat <<\_ACEOF
 
@@ -2209,7 +2209,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-mpd configure 0.20.17
+mpd configure 0.20.18
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2616,7 +2616,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by mpd $as_me 0.20.17, which was
+It was created by mpd $as_me 0.20.18, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2967,7 +2967,7 @@
 
 VERSION_MAJOR=0
 VERSION_MINOR=20
-VERSION_REVISION=17
+VERSION_REVISION=18
 VERSION_EXTRA=0
 
 
@@ -3486,7 +3486,7 @@
 
 # Define the identity of the package.
  PACKAGE='mpd'
- VERSION='0.20.17'
+ VERSION='0.20.18'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -21779,7 +21779,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by mpd $as_me 0.20.17, which was
+This file was extended by mpd $as_me 0.20.18, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -21845,7 +21845,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-mpd config.status 0.20.17
+mpd config.status 0.20.18
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/configure.ac new/mpd-0.20.18/configure.ac
--- old/mpd-0.20.17/configure.ac        2018-02-09 18:43:32.000000000 +0100
+++ new/mpd-0.20.18/configure.ac        2018-02-17 01:21:46.000000000 +0100
@@ -1,10 +1,10 @@
 AC_PREREQ(2.60)
 
-AC_INIT(mpd, 0.20.17, [email protected])
+AC_INIT(mpd, 0.20.18, [email protected])
 
 VERSION_MAJOR=0
 VERSION_MINOR=20
-VERSION_REVISION=17
+VERSION_REVISION=18
 VERSION_EXTRA=0
 
 AC_CONFIG_SRCDIR([src/Main.cxx])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/doc/doxygen.conf 
new/mpd-0.20.18/doc/doxygen.conf
--- old/mpd-0.20.17/doc/doxygen.conf    2018-02-09 18:43:54.000000000 +0100
+++ new/mpd-0.20.18/doc/doxygen.conf    2018-02-17 01:22:34.000000000 +0100
@@ -38,7 +38,7 @@
 # could be handy for archiving the generated documentation or if some version
 # control system is used.
 
-PROJECT_NUMBER         = 0.20.17
+PROJECT_NUMBER         = 0.20.18
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/python/build/autotools.py 
new/mpd-0.20.18/python/build/autotools.py
--- old/mpd-0.20.17/python/build/autotools.py   2018-01-19 12:33:35.000000000 
+0100
+++ new/mpd-0.20.18/python/build/autotools.py   2018-02-20 22:47:14.000000000 
+0100
@@ -5,6 +5,7 @@
 class AutotoolsProject(MakeProject):
     def __init__(self, url, md5, installed, configure_args=[],
                  autogen=False,
+                 autoreconf=False,
                  cppflags='',
                  ldflags='',
                  libs='',
@@ -13,6 +14,7 @@
         MakeProject.__init__(self, url, md5, installed, **kwargs)
         self.configure_args = configure_args
         self.autogen = autogen
+        self.autoreconf = autoreconf
         self.cppflags = cppflags
         self.ldflags = ldflags
         self.libs = libs
@@ -28,6 +30,8 @@
             subprocess.check_call(['aclocal'], cwd=src)
             subprocess.check_call(['automake', '--add-missing', 
'--force-missing', '--foreign'], cwd=src)
             subprocess.check_call(['autoconf'], cwd=src)
+        if self.autoreconf:
+            subprocess.check_call(['autoreconf', '-vif'], cwd=src)
 
         build = self.make_build_path(toolchain)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/python/build/libs.py 
new/mpd-0.20.18/python/build/libs.py
--- old/mpd-0.20.17/python/build/libs.py        2018-02-09 23:59:42.000000000 
+0100
+++ new/mpd-0.20.18/python/build/libs.py        2018-02-24 23:02:42.000000000 
+0100
@@ -100,8 +100,8 @@
 )
 
 ffmpeg = FfmpegProject(
-    'http://ffmpeg.org/releases/ffmpeg-3.4.1.tar.xz',
-    '5a77278a63741efa74e26bf197b9bb09ac6381b9757391b922407210f0f991c0',
+    'http://ffmpeg.org/releases/ffmpeg-3.4.2.tar.xz',
+    '2b92e9578ef8b3e49eeab229e69305f5f4cbc1fdaa22e927fc7fca18acccd740',
     'lib/libavcodec.a',
     [
         '--disable-shared', '--enable-static',
@@ -124,7 +124,6 @@
         '--disable-protocols',
         '--disable-devices',
         '--disable-filters',
-        '--disable-filters',
         '--disable-v4l2_m2m',
 
         '--disable-parser=bmp',
@@ -142,7 +141,6 @@
         '--disable-parser=mjpeg',
         '--disable-parser=mlp',
         '--disable-parser=mpeg4video',
-        '--disable-parser=mpegaudio',
         '--disable-parser=mpegvideo',
         '--disable-parser=opus',
         '--disable-parser=vc1',
@@ -194,16 +192,6 @@
         # we don't need these decoders, because we have the dedicated
         # libraries
         '--disable-decoder=flac',
-        '--disable-decoder=mp1',
-        '--disable-decoder=mp1float',
-        '--disable-decoder=mp2',
-        '--disable-decoder=mp2float',
-        '--disable-decoder=mp3',
-        '--disable-decoder=mp3adu',
-        '--disable-decoder=mp3adufloat',
-        '--disable-decoder=mp3float',
-        '--disable-decoder=mp3on4',
-        '--disable-decoder=mp3on4float',
         '--disable-decoder=opus',
         '--disable-decoder=vorbis',
 
@@ -317,7 +305,7 @@
         '--disable-decoder=svq1',
         '--disable-decoder=svq3',
         '--disable-decoder=tiff',
-        '--disable-decoder=mottiertexseqvideo',
+        '--disable-decoder=tiertexseqvideo',
         '--disable-decoder=truemotion1',
         '--disable-decoder=truemotion2',
         '--disable-decoder=truemotion2rt',
@@ -364,6 +352,21 @@
     patches='src/lib/curl/patches',
 )
 
+libnfs = AutotoolsProject(
+    'https://github.com/sahlberg/libnfs/archive/libnfs-2.0.0.tar.gz',
+    '7ea6cd8fa6c461d01091e584d424d28e137d23ff4b65b95d01a3fd0ef95d120e',
+    'lib/libnfs.a',
+    [
+        '--disable-shared', '--enable-static',
+        '--disable-debug',
+
+        # work around -Wtautological-compare
+        '--disable-werror',
+    ],
+    base='libnfs-libnfs-2.0.0',
+    autoreconf=True,
+)
+
 boost = BoostProject(
     
'http://downloads.sourceforge.net/project/boost/boost/1.66.0/boost_1_66_0.tar.bz2',
     '5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/src/Main.cxx new/mpd-0.20.18/src/Main.cxx
--- old/mpd-0.20.17/src/Main.cxx        2018-01-19 12:11:00.000000000 +0100
+++ new/mpd-0.20.18/src/Main.cxx        2018-02-24 22:32:39.000000000 +0100
@@ -50,6 +50,7 @@
 #include "unix/SignalHandlers.hxx"
 #include "system/FatalError.hxx"
 #include "thread/Slack.hxx"
+#include "net/Init.hxx"
 #include "lib/icu/Init.hxx"
 #include "config/ConfigGlobal.hxx"
 #include "config/Param.hxx"
@@ -106,11 +107,6 @@
 #include <locale.h>
 #endif
 
-#ifdef _WIN32
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#endif
-
 #ifdef __BLOCKS__
 #include <dispatch/dispatch.h>
 #endif
@@ -285,25 +281,6 @@
 }
 
 /**
- * Windows-only initialization of the Winsock2 library.
- */
-static void winsock_init(void)
-{
-#ifdef _WIN32
-       WSADATA sockinfo;
-
-       int retval = WSAStartup(MAKEWORD(2, 2), &sockinfo);
-       if(retval != 0)
-               FormatFatalError("Attempt to open Winsock2 failed; error code 
%d",
-                                retval);
-
-       if (LOBYTE(sockinfo.wVersion) != 2)
-               FatalError("We use Winsock2 but your version is either too new "
-                          "or old; please install Winsock 2.x");
-#endif
-}
-
-/**
  * Initialize the decoder and player core, including the music pipe.
  */
 static void
@@ -451,7 +428,8 @@
 
        IcuInit();
 
-       winsock_init();
+       const ScopeNetInit net_init;
+
        io_thread_init();
        config_global_init();
 
@@ -702,10 +680,6 @@
        daemonize_finish();
 #endif
 
-#ifdef _WIN32
-       WSACleanup();
-#endif
-
        IcuFinish();
 
        log_deinit();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/src/decoder/Bridge.cxx 
new/mpd-0.20.18/src/decoder/Bridge.cxx
--- old/mpd-0.20.17/src/decoder/Bridge.cxx      2017-12-03 16:12:57.000000000 
+0100
+++ new/mpd-0.20.18/src/decoder/Bridge.cxx      2018-02-17 13:33:25.000000000 
+0100
@@ -300,6 +300,7 @@
 
                initial_seek_running = false;
                timestamp = dc.start_time.ToDoubleS();
+               absolute_frame = 
dc.start_time.ToScale<uint64_t>(dc.in_audio_format.sample_rate);
                return;
        }
 
@@ -319,6 +320,7 @@
                        convert->Reset();
 
                timestamp = dc.seek_time.ToDoubleS();
+               absolute_frame = 
dc.seek_time.ToScale<uint64_t>(dc.in_audio_format.sample_rate);
        }
 
        dc.command = DecoderCommand::NONE;
@@ -427,6 +429,7 @@
        assert(t >= 0);
 
        timestamp = t;
+       absolute_frame = uint64_t(t * dc.in_audio_format.sample_rate);
 }
 
 DecoderCommand
@@ -464,6 +467,29 @@
                        return cmd;
        }
 
+       cmd = DecoderCommand::NONE;
+
+       const size_t frame_size = dc.in_audio_format.GetFrameSize();
+       size_t data_frames = length / frame_size;
+
+       if (dc.end_time.IsPositive()) {
+               /* enforce the given end time */
+
+               const uint64_t end_frame =
+                       
dc.end_time.ToScale<uint64_t>(dc.in_audio_format.sample_rate);
+               if (absolute_frame >= end_frame)
+                       return DecoderCommand::STOP;
+
+               const uint64_t remaining_frames = end_frame - absolute_frame;
+               if (data_frames >= remaining_frames) {
+                       /* past the end of the range: truncate this
+                          data submission and stop the decoder */
+                       data_frames = remaining_frames;
+                       length = data_frames * frame_size;
+                       cmd = DecoderCommand::STOP;
+               }
+       }
+
        if (convert != nullptr) {
                assert(dc.in_audio_format != dc.out_audio_format);
 
@@ -521,15 +547,11 @@
 
                timestamp += (double)nbytes /
                        dc.out_audio_format.GetTimeToSize();
-
-               if (dc.end_time.IsPositive() &&
-                   timestamp >= dc.end_time.ToDoubleS())
-                       /* the end of this range has been reached:
-                          stop decoding */
-                       return DecoderCommand::STOP;
        }
 
-       return DecoderCommand::NONE;
+       absolute_frame += data_frames;
+
+       return cmd;
 }
 
 DecoderCommand
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/src/decoder/Bridge.hxx 
new/mpd-0.20.18/src/decoder/Bridge.hxx
--- old/mpd-0.20.17/src/decoder/Bridge.hxx      2017-06-03 21:45:49.000000000 
+0200
+++ new/mpd-0.20.18/src/decoder/Bridge.hxx      2018-02-17 13:33:25.000000000 
+0100
@@ -50,6 +50,11 @@
        double timestamp = 0;
 
        /**
+        * The time stamp of the next data chunk, in PCM frames.
+        */
+       uint64_t absolute_frame = 0;
+
+       /**
         * Is the initial seek (to the start position of the sub-song)
         * pending, or has it been performed already?
         */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/src/decoder/plugins/FlacCommon.cxx 
new/mpd-0.20.18/src/decoder/plugins/FlacCommon.cxx
--- old/mpd-0.20.17/src/decoder/plugins/FlacCommon.cxx  2017-03-29 
21:22:00.000000000 +0200
+++ new/mpd-0.20.18/src/decoder/plugins/FlacCommon.cxx  2018-02-17 
13:33:53.000000000 +0100
@@ -24,7 +24,6 @@
 #include "config.h"
 #include "FlacCommon.hxx"
 #include "FlacMetadata.hxx"
-#include "util/ConstBuffer.hxx"
 #include "Log.hxx"
 
 #include <stdexcept>
@@ -143,25 +142,10 @@
        if (!initialized && !OnFirstFrame(frame.header))
                return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;
 
-       const auto data = pcm_import.Import(buf, frame.header.blocksize);
+       chunk = pcm_import.Import(buf, frame.header.blocksize);
 
-       unsigned bit_rate = nbytes * 8 * frame.header.sample_rate /
+       kbit_rate = nbytes * 8 * frame.header.sample_rate /
                (1000 * frame.header.blocksize);
 
-       auto cmd = GetClient()->SubmitData(GetInputStream(),
-                                          data.data, data.size,
-                                          bit_rate);
-       switch (cmd) {
-       case DecoderCommand::NONE:
-       case DecoderCommand::START:
-               break;
-
-       case DecoderCommand::STOP:
-               return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;
-
-       case DecoderCommand::SEEK:
-               return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
-       }
-
        return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/src/decoder/plugins/FlacCommon.hxx 
new/mpd-0.20.18/src/decoder/plugins/FlacCommon.hxx
--- old/mpd-0.20.17/src/decoder/plugins/FlacCommon.hxx  2017-01-27 
08:46:51.000000000 +0100
+++ new/mpd-0.20.18/src/decoder/plugins/FlacCommon.hxx  2018-02-17 
13:33:53.000000000 +0100
@@ -27,6 +27,7 @@
 #include "FlacInput.hxx"
 #include "FlacPcm.hxx"
 #include "../DecoderAPI.hxx"
+#include "util/ConstBuffer.hxx"
 
 #include <FLAC/stream_decoder.h>
 
@@ -41,6 +42,12 @@
         */
        bool unsupported = false;
 
+       /**
+        * The kbit_rate parameter for the next
+        * DecoderBridge::SubmitData() call.
+        */
+       uint16_t kbit_rate;
+
        FlacPcmImport pcm_import;
 
        /**
@@ -51,6 +58,13 @@
 
        Tag tag;
 
+       /**
+        * Decoded PCM data obtained by our libFLAC write callback.
+        * If this is non-empty, then DecoderBridge::SubmitData()
+        * should be called.
+        */
+       ConstBuffer<void> chunk = nullptr;
+
        FlacDecoder(DecoderClient &_client, InputStream &_input_stream)
                :FlacInput(_input_stream, &_client) {}
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mpd-0.20.17/src/decoder/plugins/FlacDecoderPlugin.cxx 
new/mpd-0.20.18/src/decoder/plugins/FlacDecoderPlugin.cxx
--- old/mpd-0.20.17/src/decoder/plugins/FlacDecoderPlugin.cxx   2017-03-29 
21:22:00.000000000 +0200
+++ new/mpd-0.20.18/src/decoder/plugins/FlacDecoderPlugin.cxx   2018-02-17 
13:33:53.000000000 +0100
@@ -139,19 +139,40 @@
        return data->initialized;
 }
 
+static DecoderCommand
+FlacSubmitToClient(DecoderClient &client, FlacDecoder &d) noexcept
+{
+       if (d.tag.IsEmpty() && d.chunk.IsEmpty())
+               return client.GetCommand();
+
+       if (!d.tag.IsEmpty()) {
+               auto cmd = client.SubmitTag(d.GetInputStream(),
+                                           std::move(d.tag));
+               d.tag.Clear();
+               if (cmd != DecoderCommand::NONE)
+                       return cmd;
+       }
+
+       if (!d.chunk.IsEmpty()) {
+               auto cmd = client.SubmitData(d.GetInputStream(),
+                                            d.chunk.data,
+                                            d.chunk.size,
+                                            d.kbit_rate);
+               d.chunk = nullptr;
+               if (cmd != DecoderCommand::NONE)
+                       return cmd;
+       }
+
+       return DecoderCommand::NONE;
+}
+
 static void
 flac_decoder_loop(FlacDecoder *data, FLAC__StreamDecoder *flac_dec)
 {
        DecoderClient &client = *data->GetClient();
 
        while (true) {
-               DecoderCommand cmd;
-               if (!data->tag.IsEmpty()) {
-                       cmd = client.SubmitTag(data->GetInputStream(),
-                                              std::move(data->tag));
-                       data->tag.Clear();
-               } else
-                       cmd = client.GetCommand();
+               DecoderCommand cmd = FlacSubmitToClient(client, *data);
 
                if (cmd == DecoderCommand::SEEK) {
                        FLAC__uint64 seek_sample = client.GetSeekFrame();
@@ -160,6 +181,11 @@
                                client.CommandFinished();
                        } else
                                client.SeekError();
+
+                       /* FLAC__stream_decoder_seek_absolute()
+                          decodes one frame and may have provided
+                          data to be submitted to the client */
+                       continue;
                } else if (cmd == DecoderCommand::STOP)
                        break;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mpd-0.20.17/src/encoder/plugins/OpusEncoderPlugin.cxx 
new/mpd-0.20.18/src/encoder/plugins/OpusEncoderPlugin.cxx
--- old/mpd-0.20.17/src/encoder/plugins/OpusEncoderPlugin.cxx   2017-01-27 
08:46:51.000000000 +0100
+++ new/mpd-0.20.18/src/encoder/plugins/OpusEncoderPlugin.cxx   2018-02-17 
01:22:17.000000000 +0100
@@ -52,7 +52,7 @@
 
        ogg_int64_t packetno = 0;
 
-       ogg_int64_t granulepos;
+       ogg_int64_t granulepos = 0;
 
 public:
        OpusEncoder(AudioFormat &_audio_format, ::OpusEncoder *_enc);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/src/lib/curl/Request.cxx 
new/mpd-0.20.18/src/lib/curl/Request.cxx
--- old/mpd-0.20.17/src/lib/curl/Request.cxx    2017-05-08 16:39:19.000000000 
+0200
+++ new/mpd-0.20.18/src/lib/curl/Request.cxx    2018-02-24 21:58:14.000000000 
+0100
@@ -62,6 +62,7 @@
        easy.SetOption(CURLOPT_NOPROGRESS, 1l);
        easy.SetOption(CURLOPT_NOSIGNAL, 1l);
        easy.SetOption(CURLOPT_CONNECTTIMEOUT, 10l);
+       easy.SetOption(CURLOPT_HTTPAUTH, (long) CURLAUTH_ANY);
        easy.SetOption(CURLOPT_URL, url);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/src/lib/nfs/Connection.cxx 
new/mpd-0.20.18/src/lib/nfs/Connection.cxx
--- old/mpd-0.20.17/src/lib/nfs/Connection.cxx  2017-02-01 21:45:21.000000000 
+0100
+++ new/mpd-0.20.18/src/lib/nfs/Connection.cxx  2018-02-24 22:44:56.000000000 
+0100
@@ -31,7 +31,11 @@
 
 #include <utility>
 
+#ifdef _WIN32
+#include <winsock2.h>
+#else
 #include <poll.h> /* for POLLIN, POLLOUT */
+#endif
 
 static constexpr std::chrono::steady_clock::duration NFS_MOUNT_TIMEOUT =
        std::chrono::minutes(1);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/src/lib/nfs/FileReader.cxx 
new/mpd-0.20.18/src/lib/nfs/FileReader.cxx
--- old/mpd-0.20.17/src/lib/nfs/FileReader.cxx  2017-02-08 08:43:46.000000000 
+0100
+++ new/mpd-0.20.18/src/lib/nfs/FileReader.cxx  2018-02-24 22:03:18.000000000 
+0100
@@ -31,7 +31,6 @@
 #include <assert.h>
 #include <string.h>
 #include <fcntl.h>
-#include <sys/stat.h>
 
 NfsFileReader::NfsFileReader()
        :DeferredMonitor(io_thread_get()), state(State::INITIAL)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/src/lib/nfs/FileReader.hxx 
new/mpd-0.20.18/src/lib/nfs/FileReader.hxx
--- old/mpd-0.20.17/src/lib/nfs/FileReader.hxx  2017-01-27 08:46:51.000000000 
+0100
+++ new/mpd-0.20.18/src/lib/nfs/FileReader.hxx  2018-02-24 22:03:20.000000000 
+0100
@@ -31,6 +31,7 @@
 
 #include <stdint.h>
 #include <stddef.h>
+#include <sys/stat.h>
 
 struct nfsfh;
 class NfsConnection;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/src/net/Init.hxx 
new/mpd-0.20.18/src/net/Init.hxx
--- old/mpd-0.20.17/src/net/Init.hxx    1970-01-01 01:00:00.000000000 +0100
+++ new/mpd-0.20.18/src/net/Init.hxx    2018-02-24 22:31:26.000000000 +0100
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2003-2017 The Music Player Daemon Project
+ * http://www.musicpd.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef NET_INIT_HXX
+#define NET_INIT_HXX
+
+#include "check.h"
+#include "SocketError.hxx"
+
+#ifdef _WIN32
+#include <winsock2.h>
+#endif
+
+class ScopeNetInit {
+#ifdef _WIN32
+public:
+       ScopeNetInit() {
+               WSADATA sockinfo;
+               int retval = WSAStartup(MAKEWORD(2, 2), &sockinfo);
+               if (retval != 0)
+                       throw MakeSocketError(retval, "WSAStartup() failed");
+       }
+
+       ~ScopeNetInit() noexcept {
+               WSACleanup();
+       }
+#endif
+};
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/src/playlist/cue/CueParser.cxx 
new/mpd-0.20.18/src/playlist/cue/CueParser.cxx
--- old/mpd-0.20.17/src/playlist/cue/CueParser.cxx      2017-05-08 
16:53:46.000000000 +0200
+++ new/mpd-0.20.18/src/playlist/cue/CueParser.cxx      2018-02-24 
21:33:20.000000000 +0100
@@ -229,6 +229,8 @@
                }
 
                state = TRACK;
+               ignore_index = false;
+
                current.reset(new DetachedSong(filename));
                assert(!current->GetTag().IsDefined());
 
@@ -238,6 +240,9 @@
        } else if (state == IGNORE_TRACK) {
                return;
        } else if (state == TRACK && strcmp(command, "INDEX") == 0) {
+               if (ignore_index)
+                       return;
+
                const char *nr = cue_next_token(&p);
                if (nr == nullptr)
                        return;
@@ -255,7 +260,7 @@
 
                current->SetStartTime(SongTime::FromMS(position_ms));
                if(strcmp(nr, "00") != 0 || previous == nullptr)
-                       state = IGNORE_TRACK;
+                       ignore_index = true;
        }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/src/playlist/cue/CueParser.hxx 
new/mpd-0.20.18/src/playlist/cue/CueParser.hxx
--- old/mpd-0.20.17/src/playlist/cue/CueParser.hxx      2017-05-08 
16:53:33.000000000 +0200
+++ new/mpd-0.20.18/src/playlist/cue/CueParser.hxx      2018-02-24 
21:35:09.000000000 +0100
@@ -88,6 +88,13 @@
        std::unique_ptr<DetachedSong> finished;
 
        /**
+        * Ignore "INDEX" lines?  Only up the first one after "00" is
+        * used.  If there is a pregap (INDEX 00..01), it is assigned
+        * to the previous song.
+        */
+       bool ignore_index;
+
+       /**
         * Tracks whether Finish() has been called.  If true, then all
         * remaining (partial) results will be delivered by Get().
         */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/src/storage/plugins/NfsStorage.cxx 
new/mpd-0.20.18/src/storage/plugins/NfsStorage.cxx
--- old/mpd-0.20.17/src/storage/plugins/NfsStorage.cxx  2017-05-08 
17:03:57.000000000 +0200
+++ new/mpd-0.20.18/src/storage/plugins/NfsStorage.cxx  2018-02-24 
22:13:50.000000000 +0100
@@ -219,7 +219,12 @@
        std::string uri_utf8("/");
        uri_utf8.append(_uri_utf8);
 
+#ifdef _WIN32
+       /* assume UTF-8 when accessing NFS from Windows */
+       return uri_utf8;
+#else
        return AllocatedPath::FromUTF8Throw(uri_utf8.c_str()).Steal();
+#endif
 }
 
 std::string
@@ -291,7 +296,7 @@
 
 gcc_pure
 static bool
-SkipNameFS(const char *name) noexcept
+SkipNameFS(PathTraitsFS::const_pointer_type name) noexcept
 {
        return name[0] == '.' &&
                (name[1] == 0 ||
@@ -358,7 +363,14 @@
 
        const struct nfsdirent *ent;
        while ((ent = connection.ReadDirectory(dir)) != nullptr) {
+#ifdef _WIN32
+               /* assume UTF-8 when accessing NFS from Windows */
+               const auto name_fs = AllocatedPath::FromUTF8Throw(ent->name);
+               if (name_fs.IsNull())
+                       continue;
+#else
                const Path name_fs = Path::FromFS(ent->name);
+#endif
                if (SkipNameFS(name_fs.c_str()))
                        continue;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/test/run_storage.cxx 
new/mpd-0.20.18/test/run_storage.cxx
--- old/mpd-0.20.17/test/run_storage.cxx        2017-01-27 08:46:51.000000000 
+0100
+++ new/mpd-0.20.18/test/run_storage.cxx        2018-02-24 22:33:16.000000000 
+0100
@@ -23,6 +23,7 @@
 #include "storage/Registry.hxx"
 #include "storage/StorageInterface.hxx"
 #include "storage/FileInfo.hxx"
+#include "net/Init.hxx"
 
 #include <memory>
 #include <stdexcept>
@@ -70,7 +71,12 @@
                char mtime_buffer[32];
                const char *mtime = "          ";
                if (info.mtime > 0) {
-                       strftime(mtime_buffer, sizeof(mtime_buffer), "%F",
+                       strftime(mtime_buffer, sizeof(mtime_buffer),
+#ifdef _WIN32
+                                "%Y-%m-%d",
+#else
+                                "%F",
+#endif
                                 gmtime(&info.mtime));
                        mtime = mtime_buffer;
                }
@@ -95,6 +101,7 @@
        const char *const command = argv[1];
        const char *const storage_uri = argv[2];
 
+       const ScopeNetInit net_init;
        const ScopeIOThread io_thread;
 
        if (strcmp(command, "ls") == 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mpd-0.20.17/win32/build.py 
new/mpd-0.20.18/win32/build.py
--- old/mpd-0.20.17/win32/build.py      2018-01-19 21:25:38.000000000 +0100
+++ new/mpd-0.20.18/win32/build.py      2018-02-24 23:02:42.000000000 +0100
@@ -58,7 +58,8 @@
 
         self.cflags = common_flags
         self.cxxflags = common_flags
-        self.cppflags = '-isystem ' + os.path.join(install_prefix, 'include')
+        self.cppflags = '-isystem ' + os.path.join(install_prefix, 'include') 
+ \
+                        ' -DWINVER=0x0600 -D_WIN32_WINNT=0x0600'
         self.ldflags = '-L' + os.path.join(install_prefix, 'lib')
         self.libs = ''
 
@@ -84,6 +85,7 @@
     liblame,
     ffmpeg,
     curl,
+    libnfs,
     boost,
 ]
 


Reply via email to