Commit c616165f authored by Max Kellermann's avatar Max Kellermann

Merge branch 'v0.16.x'

Conflicts: NEWS configure.ac src/decoder/ffmpeg_decoder_plugin.c test/read_tags.c
parents edac498d 10383274
...@@ -35,6 +35,13 @@ ver 0.17 (2011/??/??) ...@@ -35,6 +35,13 @@ ver 0.17 (2011/??/??)
* support floating point samples * support floating point samples
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) ver 0.16.7 (2012/02/04)
* input: * input:
- ffmpeg: support libavformat 0.7 - ffmpeg: support libavformat 0.7
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
static const struct tag_table ffmpeg_tags[] = { static const struct tag_table ffmpeg_tags[] = {
#if LIBAVFORMAT_VERSION_INT < ((52<<16)+(50<<8)) #if LIBAVFORMAT_VERSION_INT < ((52<<16)+(50<<8))
{ "author", TAG_ARTIST }, { "author", TAG_ARTIST },
{ "year", TAG_DATE },
#endif #endif
{ "year", TAG_DATE },
{ "author-sort", TAG_ARTIST_SORT }, { "author-sort", TAG_ARTIST_SORT },
{ "album_artist", TAG_ALBUM_ARTIST }, { "album_artist", TAG_ALBUM_ARTIST },
{ "album_artist-sort", TAG_ALBUM_ARTIST_SORT }, { "album_artist-sort", TAG_ALBUM_ARTIST_SORT },
......
...@@ -90,6 +90,12 @@ decoder_prepare_initial_seek(struct decoder *decoder) ...@@ -90,6 +90,12 @@ decoder_prepare_initial_seek(struct decoder *decoder)
const struct decoder_control *dc = decoder->dc; const struct decoder_control *dc = decoder->dc;
assert(dc->pipe != NULL); 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) if (decoder->initial_seek_running)
/* initial seek has already begun - override any other /* initial seek has already begun - override any other
command */ command */
......
...@@ -224,11 +224,7 @@ winmm_set_buffer(struct winmm_output *wo, struct winmm_buffer *buffer, ...@@ -224,11 +224,7 @@ winmm_set_buffer(struct winmm_output *wo, struct winmm_buffer *buffer,
GError **error_r) GError **error_r)
{ {
void *dest = pcm_buffer_get(&buffer->buffer, size); void *dest = pcm_buffer_get(&buffer->buffer, size);
if (dest == NULL) { assert(dest != NULL);
g_set_error(error_r, winmm_output_quark(), 0,
"Out of memory");
return false;
}
memcpy(dest, data, size); memcpy(dest, data, size);
......
...@@ -36,6 +36,11 @@ pcm_buffer_get(struct pcm_buffer *buffer, size_t size) ...@@ -36,6 +36,11 @@ pcm_buffer_get(struct pcm_buffer *buffer, size_t size)
{ {
assert(buffer != NULL); 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) { if (buffer->size < size) {
/* free the old buffer */ /* free the old buffer */
g_free(buffer->buffer); g_free(buffer->buffer);
......
...@@ -65,6 +65,10 @@ pcm_buffer_deinit(struct pcm_buffer *buffer) ...@@ -65,6 +65,10 @@ pcm_buffer_deinit(struct pcm_buffer *buffer)
/** /**
* Get the buffer, and guarantee a minimum size. This buffer becomes * Get the buffer, and guarantee a minimum size. This buffer becomes
* invalid with the next pcm_buffer_get() call. * 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 G_GNUC_MALLOC
void * void *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment