diff options
Diffstat (limited to 'src/xine-engine/xine.c')
-rw-r--r-- | src/xine-engine/xine.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index e010c3aa8..438593817 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.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: xine.c,v 1.225 2003/01/27 21:43:18 mroi Exp $ + * $Id: xine.c,v 1.226 2003/02/01 19:22:31 guenter Exp $ * * top-level xine functions * @@ -58,9 +58,9 @@ #include "xineutils.h" #include "compat.h" -/* + #define LOG -*/ + void xine_handle_stream_end (xine_stream_t *stream, int non_user) { @@ -176,7 +176,13 @@ static void xine_stop_internal (xine_stream_t *stream) { if (stream->demux_plugin) { xine_demux_stop_thread( stream ); +#ifdef LOG + printf ("xine_stop: stop thread done\n"); +#endif xine_demux_flush_engine( stream ); +#ifdef LOG + printf ("xine_stop: flush engine done\n"); +#endif /* * wait until engine has really stopped @@ -207,6 +213,12 @@ void xine_stop (xine_stream_t *stream) { pthread_mutex_lock (&stream->frontend_lock); + if (stream->audio_out) + stream->audio_out->set_flush_mode (stream->audio_out, 1); + + if (stream->video_out) + stream->video_out->set_flush_mode (stream->video_out, 1); + xine_stop_internal (stream); /* @@ -220,6 +232,12 @@ void xine_stop (xine_stream_t *stream) { if (stream->slave && (stream->slave_affection & XINE_MASTER_SLAVE_STOP)) xine_stop(stream->slave); + + if (stream->video_out) + stream->video_out->set_flush_mode (stream->video_out, 0); + + if (stream->audio_out) + stream->audio_out->set_flush_mode (stream->audio_out, 0); pthread_mutex_unlock (&stream->frontend_lock); } |