From 66235fddff35aa760b66f86312c6007bbea0bcaf Mon Sep 17 00:00:00 2001 From: Avuton Olrich Date: Sat, 4 Feb 2012 14:41:59 -0800 Subject: Modify version string to post-release version 0.16.8~git --- NEWS | 3 +++ configure.ac | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index d66811a8..c8f2773b 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +ver 0.16.8 (2012/??/??) + + ver 0.16.7 (2012/02/04) * input: - ffmpeg: support libavformat 0.7 diff --git a/configure.ac b/configure.ac index d3f4b393..bbea2562 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ(2.60) -AC_INIT(mpd, 0.16.7, musicpd-dev-team@lists.sourceforge.net) +AC_INIT(mpd, 0.16.8~git, musicpd-dev-team@lists.sourceforge.net) AC_CONFIG_SRCDIR([src/main.c]) AM_INIT_AUTOMAKE([foreign 1.10 dist-bzip2 subdir-objects]) AM_CONFIG_HEADER(config.h) -- cgit v1.2.3 From 9c92afa5fef58f3a7781d9cd95de26ab07cdd079 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 13 Feb 2012 18:10:09 +0100 Subject: output/winmm: remove pointless NULL check pcm_buffer_get() cannot ever return NULL. --- src/output/winmm_output_plugin.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/output/winmm_output_plugin.c b/src/output/winmm_output_plugin.c index b9687874..4312c635 100644 --- a/src/output/winmm_output_plugin.c +++ b/src/output/winmm_output_plugin.c @@ -200,11 +200,7 @@ winmm_set_buffer(struct winmm_output *wo, struct winmm_buffer *buffer, GError **error_r) { void *dest = pcm_buffer_get(&buffer->buffer, size); - if (dest == NULL) { - g_set_error(error_r, winmm_output_quark(), 0, - "Out of memory"); - return false; - } + assert(dest != NULL); memcpy(dest, data, size); -- cgit v1.2.3 From 7855a3257980e45dec7cc57e998a5b4fa1504903 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 13 Feb 2012 18:05:42 +0100 Subject: pcm_buffer: pcm_buffer_get() never returns NULL This fixes a bug when libsamplerate returns an empty buffer for a very small input buffer. The caller thinks this is an error, bug there is no GError object. --- NEWS | 1 + src/pcm_buffer.c | 5 +++++ src/pcm_buffer.h | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/NEWS b/NEWS index c8f2773b..3202bc05 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ ver 0.16.8 (2012/??/??) +* fix for libsamplerate assertion failure ver 0.16.7 (2012/02/04) diff --git a/src/pcm_buffer.c b/src/pcm_buffer.c index b0449d44..60a699b2 100644 --- a/src/pcm_buffer.c +++ b/src/pcm_buffer.c @@ -34,6 +34,11 @@ pcm_buffer_get(struct pcm_buffer *buffer, size_t size) { assert(buffer != NULL); + if (size == 0) + /* never return NULL, because NULL would be assumed to + be an error condition */ + size = 1; + if (buffer->size < size) { /* free the old buffer */ g_free(buffer->buffer); diff --git a/src/pcm_buffer.h b/src/pcm_buffer.h index fe223c74..b132d4fd 100644 --- a/src/pcm_buffer.h +++ b/src/pcm_buffer.h @@ -63,6 +63,10 @@ pcm_buffer_deinit(struct pcm_buffer *buffer) /** * Get the buffer, and guarantee a minimum size. This buffer becomes * invalid with the next pcm_buffer_get() call. + * + * This function will never return NULL, even if size is zero, because + * the PCM library uses the NULL return value to signal "error". An + * empty destination buffer is not always an error. */ G_GNUC_MALLOC void * -- cgit v1.2.3 From e1e3ce980af1f2fb1c4b4f3e4788a4f478bc43e7 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 13 Feb 2012 18:27:43 +0100 Subject: decoder_api: check state before emitting initial seek command This fixes seeking in the vorbis decoder during MPD startup. --- NEWS | 2 ++ src/decoder_api.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/NEWS b/NEWS index 3202bc05..1f19983a 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,7 @@ ver 0.16.8 (2012/??/??) * fix for libsamplerate assertion failure +* decoder: + - vorbis (and others): fix seeking at startup ver 0.16.7 (2012/02/04) diff --git a/src/decoder_api.c b/src/decoder_api.c index 695ca028..19de4785 100644 --- a/src/decoder_api.c +++ b/src/decoder_api.c @@ -89,6 +89,12 @@ decoder_prepare_initial_seek(struct decoder *decoder) const struct decoder_control *dc = decoder->dc; assert(dc->pipe != NULL); + if (dc->state != DECODE_STATE_DECODE) + /* wait until the decoder has finished initialisation + (reading file headers etc.) before emitting the + virtual "SEEK" command */ + return false; + if (decoder->initial_seek_running) /* initial seek has already begun - override any other command */ -- cgit v1.2.3 From 7d3d8f20ab407d4375ae934752beed33935d9431 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 13 Sep 2011 22:42:21 +0200 Subject: test/read_tags: call g_thread_init() --- test/read_tags.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/read_tags.c b/test/read_tags.c index 07d1afcb..9af2bbac 100644 --- a/test/read_tags.c +++ b/test/read_tags.c @@ -165,6 +165,7 @@ int main(int argc, char **argv) decoder_name = argv[1]; path = argv[2]; + g_thread_init(NULL); tag_pool_init(); if (!input_stream_global_init(&error)) { -- cgit v1.2.3 From 3e7e0bcb1877785716cd83199129edb68a2feab4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 3 Oct 2011 19:28:40 +0200 Subject: test/run_decoder: initialize GThread --- test/run_decoder.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/run_decoder.c b/test/run_decoder.c index 8dbd5301..4199f3c3 100644 --- a/test/run_decoder.c +++ b/test/run_decoder.c @@ -179,6 +179,7 @@ int main(int argc, char **argv) decoder_name = argv[1]; decoder.uri = argv[2]; + g_thread_init(NULL); g_log_set_default_handler(my_log_func, NULL); tag_pool_init(); -- cgit v1.2.3 From 103832742d4ef2b6bb86d287b8557ab3e64dba21 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 13 Feb 2012 19:05:39 +0100 Subject: decoder/ffmpeg: read the "year" tag This was disabled when compiled with a new ffmpeg version. Older ffmpeg versions used it explicitly, while newer ones may pass it through from the codec. --- NEWS | 1 + src/decoder/ffmpeg_decoder_plugin.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 1f19983a..aa6ef951 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ ver 0.16.8 (2012/??/??) * fix for libsamplerate assertion failure * decoder: - vorbis (and others): fix seeking at startup + - ffmpeg: read the "year" tag ver 0.16.7 (2012/02/04) diff --git a/src/decoder/ffmpeg_decoder_plugin.c b/src/decoder/ffmpeg_decoder_plugin.c index 52632dc4..2929d316 100644 --- a/src/decoder/ffmpeg_decoder_plugin.c +++ b/src/decoder/ffmpeg_decoder_plugin.c @@ -597,8 +597,8 @@ typedef struct ffmpeg_tag_map { static const ffmpeg_tag_map ffmpeg_tag_maps[] = { #if LIBAVFORMAT_VERSION_INT < ((52<<16)+(50<<8)) { TAG_ARTIST, "author" }, - { TAG_DATE, "year" }, #endif + { TAG_DATE, "year" }, { TAG_ARTIST_SORT, "author-sort" }, { TAG_ALBUM_ARTIST, "album_artist" }, { TAG_ALBUM_ARTIST_SORT, "album_artist-sort" }, -- cgit v1.2.3