diff options
author | Max Kellermann <max@duempel.org> | 2014-01-08 22:14:12 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-08 22:14:12 +0100 |
commit | 139122c57f00b9abf2058fb8c481abb958926b5c (patch) | |
tree | e28c2c70eff66781c064d0305b005562f0346fd9 | |
parent | 959d7ca9d00ec480f88ef6ea45b3dab7f0e2b717 (diff) | |
parent | fdd76b346171126e143835429a26044a1cbbfb8f (diff) | |
download | mpd-139122c57f00b9abf2058fb8c481abb958926b5c.tar.gz mpd-139122c57f00b9abf2058fb8c481abb958926b5c.tar.xz mpd-139122c57f00b9abf2058fb8c481abb958926b5c.zip |
Merge branch 'v0.18.x'
Diffstat (limited to '')
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | doc/user.xml | 2 | ||||
-rw-r--r-- | src/decoder/FaadDecoderPlugin.cxx | 2 | ||||
-rw-r--r-- | src/playlist/PlsPlaylistPlugin.cxx | 1 | ||||
-rw-r--r-- | src/util/UriUtil.cxx | 3 | ||||
-rw-r--r-- | test/test_util.cxx | 4 |
6 files changed, 12 insertions, 3 deletions
@@ -15,7 +15,10 @@ ver 0.19 (not yet released) ver 0.18.7 (not yet released) * playlist + - pls: fix crash after parser error - soundcloud: fix build failure with libyajl 2.0.1 +* decoder + - faad: fix memory leak * daemon: don't initialize supplementary groups when already running as the configured user diff --git a/doc/user.xml b/doc/user.xml index 73b2735ef..1a4859eea 100644 --- a/doc/user.xml +++ b/doc/user.xml @@ -986,7 +986,7 @@ systemctl start mpd.socket</programlisting> <tbody> <row> <entry> - <varname>default_bute_order</varname> + <varname>default_byte_order</varname> <parameter>little_endian|big_endian</parameter> </entry> <entry> diff --git a/src/decoder/FaadDecoderPlugin.cxx b/src/decoder/FaadDecoderPlugin.cxx index 242a34cb3..a37bc88bf 100644 --- a/src/decoder/FaadDecoderPlugin.cxx +++ b/src/decoder/FaadDecoderPlugin.cxx @@ -359,6 +359,7 @@ faad_stream_decode(Decoder &mpd_decoder, InputStream &is) if (!faad_decoder_init(decoder, buffer, audio_format, error)) { LogError(error); NeAACDecClose(decoder); + decoder_buffer_free(buffer); return; } @@ -428,6 +429,7 @@ faad_stream_decode(Decoder &mpd_decoder, InputStream &is) /* cleanup */ NeAACDecClose(decoder); + decoder_buffer_free(buffer); } static bool diff --git a/src/playlist/PlsPlaylistPlugin.cxx b/src/playlist/PlsPlaylistPlugin.cxx index 4dc7a7361..3fd420d89 100644 --- a/src/playlist/PlsPlaylistPlugin.cxx +++ b/src/playlist/PlsPlaylistPlugin.cxx @@ -67,7 +67,6 @@ pls_parser(GKeyFile *keyfile, std::forward_list<SongPointer> &songs) FormatError(pls_domain, "Invalid PLS entry %s: '%s'", key, error->message); g_error_free(error); - g_free(key); return; } diff --git a/src/util/UriUtil.cxx b/src/util/UriUtil.cxx index 89d2a473a..174c977e1 100644 --- a/src/util/UriUtil.cxx +++ b/src/util/UriUtil.cxx @@ -42,7 +42,8 @@ const char * uri_get_suffix(const char *uri) { const char *suffix = strrchr(uri, '.'); - if (suffix == nullptr) + if (suffix == nullptr || suffix == uri || + suffix[-1] == '/' || suffix[-1] == '\\') return nullptr; ++suffix; diff --git a/test/test_util.cxx b/test/test_util.cxx index 2ff303540..a472391a3 100644 --- a/test/test_util.cxx +++ b/test/test_util.cxx @@ -29,6 +29,10 @@ public: "jpg")); CPPUNIT_ASSERT_EQUAL(0, strcmp(uri_get_suffix("/foo.png/bar.jpg"), "jpg")); + CPPUNIT_ASSERT_EQUAL((const char *)nullptr, + uri_get_suffix(".jpg")); + CPPUNIT_ASSERT_EQUAL((const char *)nullptr, + uri_get_suffix("/foo/.jpg")); } void TestRemoveAuth() { |