From dfebbc31c27935b3742d8f7654f7b42c4d18fa69 Mon Sep 17 00:00:00 2001 From: Thibaut Mattern Date: Sat, 13 Jul 2002 15:54:02 +0000 Subject: Move the flush of the audio_out plugin to audio_decoder loop. It improves seeking. CVS patchset: 2257 CVS date: 2002/07/13 15:54:02 --- src/xine-engine/audio_decoder.c | 4 +++- src/xine-engine/demux.c | 7 ++----- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c index f52adc86d..9ac59d4a2 100644 --- a/src/xine-engine/audio_decoder.c +++ b/src/xine-engine/audio_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_decoder.c,v 1.78 2002/06/19 23:43:43 tmattern Exp $ + * $Id: audio_decoder.c,v 1.79 2002/07/13 15:54:03 tmattern Exp $ * * * functions that implement audio decoding @@ -137,6 +137,8 @@ void *audio_decoder_loop (void *this_gen) { case BUF_CONTROL_RESET_DECODER: if (this->cur_audio_decoder_plugin) this->cur_audio_decoder_plugin->reset (this->cur_audio_decoder_plugin); + if (this->audio_out) + this->audio_out->control(this->audio_out, AO_CTRL_FLUSH_BUFFERS); break; case BUF_CONTROL_DISCONTINUITY: diff --git a/src/xine-engine/demux.c b/src/xine-engine/demux.c index 631fce7f2..d8b4ed225 100644 --- a/src/xine-engine/demux.c +++ b/src/xine-engine/demux.c @@ -27,7 +27,6 @@ #include "demuxers/demux.h" #include "buffer.h" - /* internal use only - called from demuxers on seek/stop * warning: after clearing decoders fifos an absolute discontinuity * indication must be sent. relative discontinuities are likely @@ -38,6 +37,7 @@ void xine_demux_flush_engine (xine_t *this) { buf_element_t *buf; this->video_fifo->clear(this->video_fifo); + if( this->audio_fifo ) this->audio_fifo->clear(this->audio_fifo); @@ -52,10 +52,7 @@ void xine_demux_flush_engine (xine_t *this) { } this->metronom->adjust_clock(this->metronom, - this->metronom->get_current_time(this->metronom) + 30 * 90000 ); - - if (this->audio_out) - this->audio_out->control(this->audio_out, AO_CTRL_FLUSH_BUFFERS); + this->metronom->get_current_time(this->metronom) + 30 * 90000 ); } -- cgit v1.2.3