From e6c3acaa6fc6f2003b118a93306a8508e13f0fb1 Mon Sep 17 00:00:00 2001 From: Andreas Wiese Date: Fri, 14 Jan 2011 15:43:51 +0100 Subject: Fix NDEBUG test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit needs to be included unconditionally from definition of NDEBUG, since »bool« doesn't get defined otherwise. Signed-off-by: Andreas Wiese --- src/pipe.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pipe.h b/src/pipe.h index 2825b320a..b15cd76c1 100644 --- a/src/pipe.h +++ b/src/pipe.h @@ -20,9 +20,9 @@ #ifndef MPD_PIPE_H #define MPD_PIPE_H -#ifndef NDEBUG #include +#ifndef NDEBUG struct audio_format; #endif -- cgit v1.2.3 From 03018611f8b9d7ed6d55ee45ccf2b69958c05caf Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 31 Jan 2011 07:19:34 +0100 Subject: update: log all file permission problems --- NEWS | 1 + src/update.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/NEWS b/NEWS index 1a90124b5..313a5c621 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ ver 0.15.16 (2010/??/??) * encoders: - lame: explicitly configure the output sample rate +* update: log all file permission problems ver 0.15.15 (2010/11/08) diff --git a/src/update.c b/src/update.c index d5c9779c8..9a1e7d29b 100644 --- a/src/update.c +++ b/src/update.c @@ -254,6 +254,9 @@ stat_directory(const struct directory *directory, struct stat *st) if (path_fs == NULL) return -1; ret = stat(path_fs, st); + if (ret < 0) + g_warning("Failed to stat %s: %s", path_fs, g_strerror(errno)); + g_free(path_fs); return ret; } @@ -270,6 +273,9 @@ stat_directory_child(const struct directory *parent, const char *name, return -1; ret = stat(path_fs, st); + if (ret < 0) + g_warning("Failed to stat %s: %s", path_fs, g_strerror(errno)); + g_free(path_fs); return ret; } -- cgit v1.2.3 From 2a1f4539f6115f6d01f33b60adf0118122c7018a Mon Sep 17 00:00:00 2001 From: Christopher Brannon Date: Sun, 13 Feb 2011 01:37:28 +0000 Subject: Insure proper initialization of stack-allocated struct. Version 1.0.0 of the libao library added a new field to the ao_sample_format struct. It is a char * named matrix. When an ao_sample_format is allocated on the stack, this field contains garbage. The proper course is to insure that is initialized to NULL. NULL indicates that we do not want any mapping. The struct is now initialized using a static initializer, and this technique is compatible with all known versions of libao. --- NEWS | 2 ++ src/output/ao_plugin.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 313a5c621..76571d0f0 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.15.16 (2010/??/??) +* output: + - ao: initialize the ao_sample_format struct * encoders: - lame: explicitly configure the output sample rate * update: log all file permission problems diff --git a/src/output/ao_plugin.c b/src/output/ao_plugin.c index 12d2b7552..63a43ddf0 100644 --- a/src/output/ao_plugin.c +++ b/src/output/ao_plugin.c @@ -25,6 +25,9 @@ #undef G_LOG_DOMAIN #define G_LOG_DOMAIN "ao" +/* An ao_sample_format, with all fields set to zero: */ +static const ao_sample_format OUR_AO_FORMAT_INITIALIZER; + static unsigned ao_output_ref; struct ao_data { @@ -166,7 +169,7 @@ static bool ao_output_open(void *data, struct audio_format *audio_format, GError **error) { - ao_sample_format format; + ao_sample_format format = OUR_AO_FORMAT_INITIALIZER; struct ao_data *ad = (struct ao_data *)data; /* support for 24 bit samples in libao is currently dubious, -- cgit v1.2.3 From ce370bee60f685d9e7b109ac67ae656b46779f88 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 25 Feb 2011 10:46:44 +0100 Subject: output/jack: rename variable sample_size to jack_sample_size --- src/output/jack_plugin.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/output/jack_plugin.c b/src/output/jack_plugin.c index 5dc1eca24..4b71dc8c4 100644 --- a/src/output/jack_plugin.c +++ b/src/output/jack_plugin.c @@ -36,7 +36,7 @@ #undef G_LOG_DOMAIN #define G_LOG_DOMAIN "jack" -static const size_t sample_size = sizeof(jack_default_audio_sample_t); +static const size_t jack_sample_size = sizeof(jack_default_audio_sample_t); static const char *const port_names[2] = { "left", "right", @@ -118,14 +118,15 @@ mpd_jack_process(jack_nframes_t nframes, void *arg) for (unsigned i = 0; i < G_N_ELEMENTS(jd->ringbuffer); ++i) { available = jack_ringbuffer_read_space(jd->ringbuffer[i]); - assert(available % sample_size == 0); - available /= sample_size; + assert(available % jack_sample_size == 0); + available /= jack_sample_size; if (available > nframes) available = nframes; out = jack_port_get_buffer(jd->ports[i], nframes); jack_ringbuffer_read(jd->ringbuffer[i], - (char *)out, available * sample_size); + (char *)out, + available * jack_sample_size); while (available < nframes) /* ringbuffer underrun, fill with silence */ @@ -430,7 +431,7 @@ mpd_jack_play(void *data, const void *chunk, size_t size, GError **error) g_usleep(1000); } - space /= sample_size; + space /= jack_sample_size; if (space < size) size = space; -- cgit v1.2.3 From 1674a4ec828ebd6822e1d1622d9fcdae5140a61d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 27 Feb 2011 23:26:50 +0100 Subject: output/jack: fix crash with mono playback With mono sound, jack_sample_size is smaller than frame_size (4 vs 2 bytes), and "space/jack_sample_size==0". That means mpd_jack_play() will return 0, although no error has occurred. --- NEWS | 1 + src/output/jack_plugin.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 76571d0f0..381417f87 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ ver 0.15.16 (2010/??/??) * output: - ao: initialize the ao_sample_format struct + - jack: fix crash with mono playback * encoders: - lame: explicitly configure the output sample rate * update: log all file permission problems diff --git a/src/output/jack_plugin.c b/src/output/jack_plugin.c index 4b71dc8c4..0a0b8377f 100644 --- a/src/output/jack_plugin.c +++ b/src/output/jack_plugin.c @@ -423,7 +423,7 @@ mpd_jack_play(void *data, const void *chunk, size_t size, GError **error) /* send data symmetrically */ space = space1; - if (space >= frame_size) + if (space >= jack_sample_size) break; /* XXX do something more intelligent to -- cgit v1.2.3 From 4d4b7e3de076ed8cf4a4d1e780a43d777221a125 Mon Sep 17 00:00:00 2001 From: Avuton Olrich Date: Sun, 13 Mar 2011 20:27:33 -0700 Subject: mpd version 0.15.16 --- NEWS | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 381417f87..38fc5a230 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -ver 0.15.16 (2010/??/??) +ver 0.15.16 (2011/03/13) * output: - ao: initialize the ao_sample_format struct - jack: fix crash with mono playback diff --git a/configure.ac b/configure.ac index 8844a1dbe..9f212b583 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ(2.60) -AC_INIT(mpd, 0.15.16~git, musicpd-dev-team@lists.sourceforge.net) +AC_INIT(mpd, 0.15.16, musicpd-dev-team@lists.sourceforge.net) AC_CONFIG_SRCDIR([src/main.c]) AM_INIT_AUTOMAKE([foreign 1.9 dist-bzip2]) AM_CONFIG_HEADER(config.h) -- cgit v1.2.3