diff options
Diffstat (limited to '')
-rw-r--r-- | src/database.c | 9 | ||||
-rw-r--r-- | src/decoder/flac_plugin.c | 3 | ||||
-rw-r--r-- | src/log.c | 8 | ||||
-rw-r--r-- | src/output/httpd_output_plugin.c | 5 | ||||
-rw-r--r-- | src/output_all.c | 2 | ||||
-rw-r--r-- | src/output_thread.c | 6 |
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; @@ -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; |