summaryrefslogtreecommitdiff
path: root/src/xine-engine/audio_out.c
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2007-11-25 21:22:23 +0000
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2007-11-25 21:22:23 +0000
commitb16de9c5e59ce99cba75f51cde8f2c441d36e55b (patch)
treed9ba24b391a016967e370c95cce8883b85d06e19 /src/xine-engine/audio_out.c
parentabdd7c762e646a27d0db6951364148163a0d7925 (diff)
parent0e2e43f9050cde0fd5c34d4848cda31bb4ef6a2e (diff)
downloadxine-lib-b16de9c5e59ce99cba75f51cde8f2c441d36e55b.tar.gz
xine-lib-b16de9c5e59ce99cba75f51cde8f2c441d36e55b.tar.bz2
Merge from 1.1.
Some fixups were required for the kfreebsd patch; needs testing. --HG-- rename : src/video_out/libdha/ports.c => contrib/libdha/ports.c rename : src/demuxers/demux_ogg.c => src/combined/xine_ogg_demuxer.c rename : src/libxineadec/xine_vorbis_decoder.c => src/combined/xine_vorbis_decoder.c
Diffstat (limited to 'src/xine-engine/audio_out.c')
-rw-r--r--src/xine-engine/audio_out.c6
1 files changed, 6 insertions, 0 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);
}