aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-07-16 07:37:13 +0200
committerMax Kellermann <max@duempel.org>2009-07-16 07:37:13 +0200
commit4100035b19a5d0dedcf8f71a272fa67f6a24361a (patch)
treec4a0f11b0cf5d219fd70e55316ed0b95f348480c /src
parent9bef46c0daa4fa2778db0e05d5883746cc995264 (diff)
parentd7bad6ae020ffabfd5d2ae9d2ce723e67e999077 (diff)
downloadmpd-4100035b19a5d0dedcf8f71a272fa67f6a24361a.tar.gz
mpd-4100035b19a5d0dedcf8f71a272fa67f6a24361a.tar.xz
mpd-4100035b19a5d0dedcf8f71a272fa67f6a24361a.zip
Merged release 0.15.1 from branch 'v0.15.x'
Diffstat (limited to '')
-rw-r--r--src/database.c9
-rw-r--r--src/decoder/flac_plugin.c3
-rw-r--r--src/log.c8
-rw-r--r--src/output/httpd_output_plugin.c5
-rw-r--r--src/output_all.c2
-rw-r--r--src/output_thread.c6
6 files changed, 14 insertions, 19 deletions
diff --git a/src/database.c b/src/database.c
index 7257930bc..5a06dda98 100644
--- a/src/database.c
+++ b/src/database.c
@@ -318,10 +318,11 @@ db_load(GError **error)
if (old_charset != NULL
&& strcmp(new_charset, old_charset)) {
fclose(fp);
- g_message("Existing database has charset \"%s\" "
- "instead of \"%s\"; "
- "discarding database file",
- new_charset, old_charset);
+ g_set_error(error, db_quark(), 0,
+ "Existing database has charset "
+ "\"%s\" instead of \"%s\"; "
+ "discarding database file",
+ new_charset, old_charset);
return false;
}
} else {
diff --git a/src/decoder/flac_plugin.c b/src/decoder/flac_plugin.c
index b235469f2..89a812f52 100644
--- a/src/decoder/flac_plugin.c
+++ b/src/decoder/flac_plugin.c
@@ -408,6 +408,7 @@ flac_decode_internal(struct decoder * decoder,
if (!(flac_dec = flac_new()))
return;
flac_data_init(&data, decoder, input_stream);
+ data.tag = tag_new();
#if defined(FLAC_API_VERSION_CURRENT) && FLAC_API_VERSION_CURRENT > 7
if(!FLAC__stream_decoder_set_metadata_respond(flac_dec, FLAC__METADATA_TYPE_VORBIS_COMMENT))
@@ -436,8 +437,6 @@ flac_decode_internal(struct decoder * decoder,
}
}
- data.tag = tag_new();
-
if (!flac_process_metadata(flac_dec)) {
err = "problem reading metadata";
goto fail;
diff --git a/src/log.c b/src/log.c
index b7c6b9bb0..94691ab64 100644
--- a/src/log.c
+++ b/src/log.c
@@ -259,12 +259,8 @@ void log_init(bool verbose, bool use_stdout)
log_init_syslog();
#endif
} else {
- char *path = parsePath(param->value);
- g_free(param->value);
-
- if (path == NULL)
- g_error("error parsing \"%s\" at line %i\n",
- CONF_LOG_FILE, param->line);
+ const char *path = config_get_path(CONF_LOG_FILE);
+ assert(path != NULL);
log_init_file(path, param->line);
}
diff --git a/src/output/httpd_output_plugin.c b/src/output/httpd_output_plugin.c
index 02fa1cf17..9fdf46456 100644
--- a/src/output/httpd_output_plugin.c
+++ b/src/output/httpd_output_plugin.c
@@ -28,15 +28,12 @@
#include <assert.h>
+#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
#include <unistd.h>
#include <errno.h>
-#ifdef HAVE_OSX
-#include <sys/types.h>
-#endif
-
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "httpd_output"
diff --git a/src/output_all.c b/src/output_all.c
index c6fb0f481..4b5ba3a6f 100644
--- a/src/output_all.c
+++ b/src/output_all.c
@@ -439,8 +439,6 @@ audio_output_all_cancel(void)
{
unsigned int i;
- audio_output_all_update();
-
/* send the cancel() command to all audio outputs */
for (i = 0; i < num_audio_outputs; ++i) {
diff --git a/src/output_thread.c b/src/output_thread.c
index 4b60d9d60..2592b2456 100644
--- a/src/output_thread.c
+++ b/src/output_thread.c
@@ -338,7 +338,11 @@ static gpointer audio_output_task(gpointer arg)
case AO_COMMAND_PAUSE:
ao_pause(ao);
- break;
+ /* don't "break" here: this might cause
+ ao_play() to be called when command==CLOSE
+ ends the paused state - "continue" checks
+ the new command first */
+ continue;
case AO_COMMAND_CANCEL:
ao->chunk = NULL;