From 9f8c2b3b566874e70dd3f88dd170dee54d811dbd Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 4 Nov 2014 09:24:09 +0100 Subject: [PATCH 1/6] configure.ac: prepare for 0.19.3 --- NEWS | 2 ++ configure.ac | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index e8e84ff7e..54cf71f1e 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +ver 0.19.3 (not yet released) + ver 0.19.2 (2014/11/02) * input - curl: fix redirected streams diff --git a/configure.ac b/configure.ac index f689a9fcc..a0c1e32ed 100644 --- a/configure.ac +++ b/configure.ac @@ -1,10 +1,10 @@ AC_PREREQ(2.60) -AC_INIT(mpd, 0.19.2, musicpd-dev-team@lists.sourceforge.net) +AC_INIT(mpd, 0.19.3, musicpd-dev-team@lists.sourceforge.net) VERSION_MAJOR=0 VERSION_MINOR=19 -VERSION_REVISION=2 +VERSION_REVISION=3 VERSION_EXTRA=0 AC_CONFIG_SRCDIR([src/Main.cxx]) From 362e73bea88c8bf4a59e16939da615bf5ddf0558 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 7 Nov 2014 13:56:34 +0100 Subject: [PATCH 2/6] input/Open: expose input_domain --- Makefile.am | 1 + src/input/Domain.cxx | 24 ++++++++++++++++++++++++ src/input/Domain.hxx | 27 +++++++++++++++++++++++++++ src/input/Open.cxx | 3 +-- 4 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 src/input/Domain.cxx create mode 100644 src/input/Domain.hxx diff --git a/Makefile.am b/Makefile.am index dac3e1772..72b6a0ca4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1112,6 +1112,7 @@ endif # libinput_a_SOURCES = \ + src/input/Domain.cxx src/input/Domain.hxx \ src/input/Init.cxx src/input/Init.hxx \ src/input/Registry.cxx src/input/Registry.hxx \ src/input/Open.cxx \ diff --git a/src/input/Domain.cxx b/src/input/Domain.cxx new file mode 100644 index 000000000..26ae298a4 --- /dev/null +++ b/src/input/Domain.cxx @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2003-2014 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. + */ + +#include "config.h" +#include "Domain.hxx" +#include "util/Domain.hxx" + +const Domain input_domain("input"); diff --git a/src/input/Domain.hxx b/src/input/Domain.hxx new file mode 100644 index 000000000..16fa5e0f1 --- /dev/null +++ b/src/input/Domain.hxx @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2003-2014 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 MPD_INPUT_DOMAIN_HXX +#define MPD_INPUT_DOMAIN_HXX + +class Domain; + +extern const Domain input_domain; + +#endif diff --git a/src/input/Open.cxx b/src/input/Open.cxx index 18572d6b2..66ccdce74 100644 --- a/src/input/Open.cxx +++ b/src/input/Open.cxx @@ -22,14 +22,13 @@ #include "Registry.hxx" #include "InputPlugin.hxx" #include "LocalOpen.hxx" +#include "Domain.hxx" #include "plugins/RewindInputPlugin.hxx" #include "fs/Traits.hxx" #include "fs/Path.hxx" #include "util/Error.hxx" #include "util/Domain.hxx" -static constexpr Domain input_domain("input"); - InputStream * InputStream::Open(const char *url, Mutex &mutex, Cond &cond, From 1bd8a322f52c3094b8d343f249f54b75a97bd598 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 7 Nov 2014 13:55:23 +0100 Subject: [PATCH 3/6] input/AsyncInputStream: set Error when seeking unseekable Fixes crash in the "audiofile" decoder while logging the seek error. --- NEWS | 2 ++ src/input/AsyncInputStream.cxx | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 54cf71f1e..0de0a829c 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.19.3 (not yet released) +* decoder + - audiofile: fix crash while playing streams ver 0.19.2 (2014/11/02) * input diff --git a/src/input/AsyncInputStream.cxx b/src/input/AsyncInputStream.cxx index d34ba2ff3..c8e3fcfd5 100644 --- a/src/input/AsyncInputStream.cxx +++ b/src/input/AsyncInputStream.cxx @@ -19,6 +19,7 @@ #include "config.h" #include "AsyncInputStream.hxx" +#include "Domain.hxx" #include "tag/Tag.hxx" #include "event/Call.hxx" #include "thread/Cond.hxx" @@ -113,8 +114,10 @@ AsyncInputStream::Seek(offset_type new_offset, Error &error) /* no-op */ return true; - if (!IsSeekable()) + if (!IsSeekable()) { + error.Set(input_domain, "Not seekable"); return false; + } /* check if we can fast-forward the buffer */ From 6f23e91e335b3415080fcbc90cb9fc3cdcc4344f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 7 Nov 2014 18:42:51 +0100 Subject: [PATCH 4/6] lib/upnp/ContentDirectoryService: swap uri_apply_base() parameters When uri_apply_base() was moved from db/upnp/Util.cpp to util/UriUtil.cpp, the parameter order was changed, however without swapping the parameters in the ContentDirectoryService constructor. --- NEWS | 2 ++ src/lib/upnp/ContentDirectoryService.cxx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 0de0a829c..d59b2eff3 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.19.3 (not yet released) +* database + - upnp: fix breakage due to malformed URIs * decoder - audiofile: fix crash while playing streams diff --git a/src/lib/upnp/ContentDirectoryService.cxx b/src/lib/upnp/ContentDirectoryService.cxx index ee7c0d7f5..0e5d2d955 100644 --- a/src/lib/upnp/ContentDirectoryService.cxx +++ b/src/lib/upnp/ContentDirectoryService.cxx @@ -29,7 +29,7 @@ ContentDirectoryService::ContentDirectoryService(const UPnPDevice &device, const UPnPService &service) - :m_actionURL(uri_apply_base(device.URLBase, service.controlURL)), + :m_actionURL(uri_apply_base(service.controlURL, device.URLBase)), m_serviceType(service.serviceType), m_deviceId(device.UDN), m_friendlyName(device.friendlyName), From ccb13205f4920b3bd5e8c52f5ec587cf1adf375f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 7 Nov 2014 19:12:43 +0100 Subject: [PATCH 5/6] db/upnp: fix valgrind warning --- src/db/plugins/upnp/Directory.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/db/plugins/upnp/Directory.cxx b/src/db/plugins/upnp/Directory.cxx index 683022a10..e94a1a997 100644 --- a/src/db/plugins/upnp/Directory.cxx +++ b/src/db/plugins/upnp/Directory.cxx @@ -129,6 +129,7 @@ public: state(NONE), tag_type(TAG_NUM_OF_ITEM_TYPES) { + m_tobj.clear(); } protected: From 125eb01e03082f1c33fa1b0b6d51b953eebf6c28 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 7 Nov 2014 19:22:26 +0100 Subject: [PATCH 6/6] decoder/ffmpeg: support opus --- NEWS | 1 + src/decoder/plugins/FfmpegDecoderPlugin.cxx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index d59b2eff3..94ce8d4ba 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ ver 0.19.3 (not yet released) - upnp: fix breakage due to malformed URIs * decoder - audiofile: fix crash while playing streams + - ffmpeg: support opus ver 0.19.2 (2014/11/02) * input diff --git a/src/decoder/plugins/FfmpegDecoderPlugin.cxx b/src/decoder/plugins/FfmpegDecoderPlugin.cxx index 2e72269b2..466caa3d1 100644 --- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx +++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx @@ -657,7 +657,7 @@ static const char *const ffmpeg_suffixes[] = { "mj2", "mjpeg", "mjpg", "mka", "mkv", "mlp", "mm", "mmf", "mov", "mp+", "mp1", "mp2", "mp3", "mp4", "mpc", "mpeg", "mpg", "mpga", "mpp", "mpu", "mve", "mvi", "mxf", "nc", "nsv", "nut", "nuv", "oga", "ogm", "ogv", - "ogx", "oma", "ogg", "omg", "psp", "pva", "qcp", "qt", "r3d", "ra", + "ogx", "oma", "ogg", "omg", "opus", "psp", "pva", "qcp", "qt", "r3d", "ra", "ram", "rl2", "rm", "rmvb", "roq", "rpl", "rvc", "shn", "smk", "snd", "sol", "son", "spx", "str", "swf", "tgi", "tgq", "tgv", "thp", "ts", "tsp", "tta", "xa", "xvid", "uv", "uv2", "vb", "vid", "vob", "voc", @@ -691,6 +691,7 @@ static const char *const ffmpeg_mime_types[] = { "audio/mpeg", "audio/musepack", "audio/ogg", + "audio/opus", "audio/qcelp", "audio/vorbis", "audio/vorbis+ogg",