From 2b579aeb4f6177de619eb02129f780675a5482ff Mon Sep 17 00:00:00 2001 From: Matthias Drochner Date: Mon, 27 May 2013 19:37:35 +0200 Subject: NULL pointer vs bool "false" confusion there are some places in the mpd-0.17.4 sources where a "false" is used instead of a NULL pointer. --- src/conf.c | 2 +- src/song_update.c | 2 +- src/update_song.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/conf.c b/src/conf.c index 167f2da92..a22f2ec91 100644 --- a/src/conf.c +++ b/src/conf.c @@ -317,7 +317,7 @@ config_read_block(FILE *fp, int *count, char *string, GError **error_r) g_set_error(error_r, config_quark(), 0, "line %i: Unknown tokens after '}'", *count); - return false; + return NULL; } return ret; diff --git a/src/song_update.c b/src/song_update.c index 37f502a20..f9d6b6f46 100644 --- a/src/song_update.c +++ b/src/song_update.c @@ -187,7 +187,7 @@ song_file_update_inarchive(struct song *song) if (suffix == NULL) return false; - plugin = decoder_plugin_from_suffix(suffix, false); + plugin = decoder_plugin_from_suffix(suffix, NULL); if (plugin == NULL) return false; diff --git a/src/update_song.c b/src/update_song.c index 1126ad115..f5930d688 100644 --- a/src/update_song.c +++ b/src/update_song.c @@ -104,7 +104,7 @@ update_song_file(struct directory *directory, const struct stat *st) { const struct decoder_plugin *plugin = - decoder_plugin_from_suffix(suffix, false); + decoder_plugin_from_suffix(suffix, NULL); if (plugin == NULL) return false; -- cgit v1.2.3 From d59a332ef96666d2d7df71d0885f8e652dd6fc1b Mon Sep 17 00:00:00 2001 From: tsufeki Date: Thu, 1 Aug 2013 08:42:22 +0200 Subject: commmand: fix URI argument in playlistadd --- src/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/command.c b/src/command.c index 34ec87247..b3318c68b 100644 --- a/src/command.c +++ b/src/command.c @@ -1579,7 +1579,7 @@ handle_playlistadd(struct 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 = addAllInToStoredPlaylist(uri, playlist, &error); -- cgit v1.2.3 From 363050f44c9aa75b93a2402f0df2f1c5e97c35e9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 1 Aug 2013 09:28:03 +0200 Subject: playlist_edit: fix "move" relative to current when there is no current song Fixes Mantis #3770. --- src/playlist_edit.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/playlist_edit.c b/src/playlist_edit.c index d10f49451..8042f2f76 100644 --- a/src/playlist_edit.c +++ b/src/playlist_edit.c @@ -396,7 +396,12 @@ playlist_move_range(struct playlist *playlist, struct player_control *pc, ? (int)queue_order_to_position(&playlist->queue, playlist->current) : -1; - if (to < 0 && playlist->current >= 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; -- cgit v1.2.3 From 7ff988275f9c3487d54c23d55218301aa0111aff Mon Sep 17 00:00:00 2001 From: Christoph Mende Date: Sat, 20 Apr 2013 08:29:11 +0200 Subject: decoder/mikmod: use MikMod_free() to free the title on libmikmod-3.2 Player_LoadTitle() returns an aligned pointer in libmikmod-3.2 that cannot be freed with free(). The correct way to do this now is MikMod_free() which extracts the original pointer from the buffer and frees that. Signed-off-by: Christoph Mende --- src/decoder/mikmod_decoder_plugin.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/decoder/mikmod_decoder_plugin.c b/src/decoder/mikmod_decoder_plugin.c index 5681a7a57..a8fe818de 100644 --- a/src/decoder/mikmod_decoder_plugin.c +++ b/src/decoder/mikmod_decoder_plugin.c @@ -200,7 +200,11 @@ mikmod_decoder_scan_file(const char *path_fs, if (title != NULL) { tag_handler_invoke_tag(handler, handler_ctx, TAG_TITLE, title); +#if (LIBMIKMOD_VERSION >= 0x030200) + MikMod_free(title); +#else free(title); +#endif } return true; -- cgit v1.2.3 From 3a34fd181d4bb1d57426d47fd188228ac290aa5d Mon Sep 17 00:00:00 2001 From: Justin Riley Date: Tue, 2 Jul 2013 16:16:46 -0400 Subject: FfmpegDecoderPlugin: add application/flv to mime types list --- src/decoder/ffmpeg_decoder_plugin.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/decoder/ffmpeg_decoder_plugin.c b/src/decoder/ffmpeg_decoder_plugin.c index fcf7507f4..58bd2f54a 100644 --- a/src/decoder/ffmpeg_decoder_plugin.c +++ b/src/decoder/ffmpeg_decoder_plugin.c @@ -717,6 +717,7 @@ static const char *const ffmpeg_suffixes[] = { }; static const char *const ffmpeg_mime_types[] = { + "application/flv", "application/m4a", "application/mp4", "application/octet-stream", -- cgit v1.2.3