aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-08-04 14:36:22 +0200
committerMax Kellermann <max@duempel.org>2013-08-04 14:36:22 +0200
commit9326ce53ecd225269147109d87af763fc3846ddf (patch)
tree510b468db4f9007502516c1bf7dc8db65c655da6 /src
parentfcb7233b25f21c15e132a9c0e0de5ab5b4f492c7 (diff)
parentd8217c364a182a12fb8abd19732341af1515ffb0 (diff)
downloadmpd-9326ce53ecd225269147109d87af763fc3846ddf.tar.gz
mpd-9326ce53ecd225269147109d87af763fc3846ddf.tar.xz
mpd-9326ce53ecd225269147109d87af763fc3846ddf.zip
Merge tag 'release-0.17.5'
Diffstat (limited to '')
-rw-r--r--src/PlaylistCommands.cxx2
-rw-r--r--src/PlaylistEdit.cxx7
-rw-r--r--src/SongUpdate.cxx2
-rw-r--r--src/decoder/FfmpegDecoderPlugin.cxx1
-rw-r--r--src/decoder/MikmodDecoderPlugin.cxx4
5 files changed, 13 insertions, 3 deletions
diff --git a/src/PlaylistCommands.cxx b/src/PlaylistCommands.cxx
index e3b5ad5f8..d68a30ba7 100644
--- a/src/PlaylistCommands.cxx
+++ b/src/PlaylistCommands.cxx
@@ -193,7 +193,7 @@ handle_playlistadd(Client *client, G_GNUC_UNUSED int argc, char *argv[])
return COMMAND_RETURN_ERROR;
}
- success = spl_append_uri(argv[1], playlist, &error);
+ success = spl_append_uri(uri, playlist, &error);
} else
success = search_add_to_playlist(uri, playlist, nullptr,
&error);
diff --git a/src/PlaylistEdit.cxx b/src/PlaylistEdit.cxx
index e3d3eac25..0d46f66aa 100644
--- a/src/PlaylistEdit.cxx
+++ b/src/PlaylistEdit.cxx
@@ -342,7 +342,12 @@ playlist::MoveRange(player_control &pc, unsigned start, unsigned end, int to)
* (-playlist.length == to) => move to position BEFORE current song
*/
const int currentSong = GetCurrentPosition();
- if (to < 0 && currentSong >= 0) {
+ if (to < 0) {
+ if (currentSong < 0)
+ /* can't move relative to current song,
+ because there is no current song */
+ return PLAYLIST_RESULT_BAD_RANGE;
+
if (start <= (unsigned)currentSong && (unsigned)currentSong < end)
/* no-op, can't be moved to offset of itself */
return PLAYLIST_RESULT_SUCCESS;
diff --git a/src/SongUpdate.cxx b/src/SongUpdate.cxx
index 9c4d44227..f08e0c20a 100644
--- a/src/SongUpdate.cxx
+++ b/src/SongUpdate.cxx
@@ -173,7 +173,7 @@ Song::UpdateFileInArchive()
if (suffix == NULL)
return false;
- plugin = decoder_plugin_from_suffix(suffix, nullptr);
+ plugin = decoder_plugin_from_suffix(suffix, NULL);
if (plugin == NULL)
return false;
diff --git a/src/decoder/FfmpegDecoderPlugin.cxx b/src/decoder/FfmpegDecoderPlugin.cxx
index f42fc36a3..89e57c874 100644
--- a/src/decoder/FfmpegDecoderPlugin.cxx
+++ b/src/decoder/FfmpegDecoderPlugin.cxx
@@ -586,6 +586,7 @@ static const char *const ffmpeg_suffixes[] = {
};
static const char *const ffmpeg_mime_types[] = {
+ "application/flv",
"application/m4a",
"application/mp4",
"application/octet-stream",
diff --git a/src/decoder/MikmodDecoderPlugin.cxx b/src/decoder/MikmodDecoderPlugin.cxx
index b7d113265..f9896ef98 100644
--- a/src/decoder/MikmodDecoderPlugin.cxx
+++ b/src/decoder/MikmodDecoderPlugin.cxx
@@ -199,7 +199,11 @@ mikmod_decoder_scan_file(const char *path_fs,
if (title != nullptr) {
tag_handler_invoke_tag(handler, handler_ctx,
TAG_TITLE, title);
+#if (LIBMIKMOD_VERSION >= 0x030200)
+ MikMod_free(title);
+#else
free(title);
+#endif
}
return true;