diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-12-24 14:00:55 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-12-24 14:00:55 +0000 |
commit | b18d857dad27367e9c517d68a5fe501a48fec164 (patch) | |
tree | f12827081644ed85c610b22abb1dcfa3d4a17dff /src/xine-engine/demux.c | |
parent | 359d8d8860cc1748a0f0e18bc791c80392cf7e48 (diff) | |
download | xine-lib-b18d857dad27367e9c517d68a5fe501a48fec164.tar.gz xine-lib-b18d857dad27367e9c517d68a5fe501a48fec164.tar.bz2 |
discard buffers on flush so decoder will return faster. seeking should be
faster as well.
(on a problematic stream i have, seeking time was reduced from 2.5s to 0.8s)
CVS patchset: 3665
CVS date: 2002/12/24 14:00:55
Diffstat (limited to 'src/xine-engine/demux.c')
-rw-r--r-- | src/xine-engine/demux.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/xine-engine/demux.c b/src/xine-engine/demux.c index 20474d71f..63189d5f4 100644 --- a/src/xine-engine/demux.c +++ b/src/xine-engine/demux.c @@ -59,6 +59,10 @@ void xine_demux_flush_engine (xine_stream_t *stream) { stream->audio_fifo->put (stream->audio_fifo, buf); } + if (stream->audio_out) { + stream->audio_out->set_property(stream->audio_out, AO_PROP_DISCARD_BUFFERS, 1); + } + /* on seeking we must wait decoder fifos to process before doing flush. * otherwise we flush too early (before the old data has left decoders) */ @@ -70,6 +74,7 @@ void xine_demux_flush_engine (xine_stream_t *stream) { if (stream->audio_out) { stream->audio_out->flush(stream->audio_out); + stream->audio_out->set_property(stream->audio_out, AO_PROP_DISCARD_BUFFERS, 0); } } |