summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThibaut Mattern <tmattern@users.sourceforge.net>2003-06-18 07:05:12 +0000
committerThibaut Mattern <tmattern@users.sourceforge.net>2003-06-18 07:05:12 +0000
commit3950a021c4d0906d52bd827e3220d54d4cfc5f27 (patch)
treeff3ff83b3b181342067581a21ef59d6f7a2f1cbb /src
parentc2a296aad31073526b3e19de17c82b69f20e885c (diff)
downloadxine-lib-3950a021c4d0906d52bd827e3220d54d4cfc5f27.tar.gz
xine-lib-3950a021c4d0906d52bd827e3220d54d4cfc5f27.tar.bz2
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
Diffstat (limited to 'src')
-rw-r--r--src/xine-engine/demux.c11
1 files changed, 8 insertions, 3 deletions
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 <stdio.h>
#include <string.h>
#include <pthread.h>
@@ -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) {