diff options
Diffstat (limited to 'src/xine-engine')
-rw-r--r-- | src/xine-engine/audio_out.c | 6 | ||||
-rw-r--r-- | src/xine-engine/input_cache.c | 2 | ||||
-rw-r--r-- | src/xine-engine/xine.c | 8 | ||||
-rw-r--r-- | src/xine-engine/xine_interface.c | 2 |
4 files changed, 15 insertions, 3 deletions
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index 288e27672..76d678aa2 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -291,6 +291,7 @@ struct audio_fifo_s { int num_buffers; }; +static int ao_set_property (xine_audio_port_t *this_gen, int property, int value); static audio_fifo_t *fifo_new (xine_t *xine) { @@ -1598,6 +1599,11 @@ static void ao_close(xine_audio_port_t *this_gen, xine_stream_t *stream) { xprintf (this->xine, XINE_VERBOSITY_DEBUG, "audio_out: no streams left, closing driver\n"); if (this->audio_loop_running) { + if (this->clock->speed == XINE_SPEED_PAUSE || + (this->clock->speed != XINE_FINE_SPEED_NORMAL && !this->slow_fast_audio)) { + /* discard buffers, otherwise we'll wait forever */ + ao_set_property(this_gen, AO_PROP_DISCARD_BUFFERS, 1); + } /* make sure there are no more buffers on queue */ fifo_wait_empty(this->out_fifo); } diff --git a/src/xine-engine/input_cache.c b/src/xine-engine/input_cache.c index 83ec4ae33..0535bc8f7 100644 --- a/src/xine-engine/input_cache.c +++ b/src/xine-engine/input_cache.c @@ -34,6 +34,7 @@ */ #include "xine_internal.h" +#include <assert.h> #define DEFAULT_BUFFER_SIZE 1024 @@ -191,6 +192,7 @@ static buf_element_t *cache_plugin_read_block(input_plugin_t *this_gen, fifo_buf if (buf) { buf->type = BUF_DEMUX_BLOCK; + assert(todo <= buf->max_size); read_len = cache_plugin_read (this_gen, buf->content, todo); buf->size = read_len; } diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 83137fb82..77430a053 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -35,7 +35,7 @@ #include <pthread.h> #include <stdarg.h> #include <stdio.h> -#if defined (__linux__) +#if defined (__linux__) || defined (__GLIBC__) #include <endian.h> #elif defined (__FreeBSD__) #include <machine/endian.h> @@ -1233,7 +1233,11 @@ static int open_internal (xine_stream_t *stream, const char *mrl) { stream->demux_plugin->send_headers (stream->demux_plugin); if (stream->demux_plugin->get_status(stream->demux_plugin) != DEMUX_OK) { - xine_log (stream->xine, XINE_LOG_MSG, _("xine: demuxer failed to start\n")); + if (stream->demux_plugin->get_status(stream->demux_plugin) == DEMUX_FINISHED) { + xine_log (stream->xine, XINE_LOG_MSG, _("xine: demuxer is already done. that was fast!\n")); + } else { + xine_log (stream->xine, XINE_LOG_MSG, _("xine: demuxer failed to start\n")); + } _x_free_demux_plugin(stream, stream->demux_plugin); stream->demux_plugin = NULL; diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c index 48f3a6df0..50d8796e8 100644 --- a/src/xine-engine/xine_interface.c +++ b/src/xine-engine/xine_interface.c @@ -32,7 +32,7 @@ #include <stdlib.h> #include <pthread.h> #include <stdarg.h> -#if defined (__linux__) +#if defined (__linux__) || defined (__GLIBC__) #include <endian.h> #elif defined (__FreeBSD__) #include <machine/endian.h> |