From 3950a021c4d0906d52bd827e3220d54d4cfc5f27 Mon Sep 17 00:00:00 2001 From: Thibaut Mattern Date: Wed, 18 Jun 2003 07:05:12 +0000 Subject: Use the same discard mecanism for audio and video in xine_demux_flush_engine. CVS patchset: 5061 CVS date: 2003/06/18 07:05:12 --- src/xine-engine/demux.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/xine-engine/demux.c b/src/xine-engine/demux.c index 2707165a3..b93b04370 100644 --- a/src/xine-engine/demux.c +++ b/src/xine-engine/demux.c @@ -23,6 +23,7 @@ * $id$ */ + #include #include #include @@ -57,6 +58,12 @@ void xine_demux_flush_engine (xine_stream_t *stream) { buf_element_t *buf; + if (stream->video_out) { + stream->video_out->set_property(stream->video_out, VO_PROP_DISCARD_FRAMES, 1); + } + if (stream->audio_out) { + stream->audio_out->set_property(stream->audio_out, AO_PROP_DISCARD_BUFFERS, 1); + } stream->video_fifo->clear(stream->video_fifo); if( stream->audio_fifo ) @@ -72,9 +79,6 @@ 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) @@ -83,6 +87,7 @@ void xine_demux_flush_engine (xine_stream_t *stream) { if (stream->video_out) { stream->video_out->flush(stream->video_out); + stream->video_out->set_property(stream->video_out, VO_PROP_DISCARD_FRAMES, 0); } if (stream->audio_out) { -- cgit v1.2.3