diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2008-03-10 23:11:49 -0300 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2008-03-10 23:11:49 -0300 |
commit | d3572a729ae098dba38d27a2b1914b6ca17c4de1 (patch) | |
tree | 68e6cd4c9120d87de4491216e0c0943dfcb7b393 /src/xine-engine/xine.c | |
parent | 7c037569b273a754f232f42309f7bda34c9d5268 (diff) | |
download | xine-lib-d3572a729ae098dba38d27a2b1914b6ca17c4de1.tar.gz xine-lib-d3572a729ae098dba38d27a2b1914b6ca17c4de1.tar.bz2 |
Fixed long delay when closing stream on dual core systems [Bug #33]
Diffstat (limited to 'src/xine-engine/xine.c')
-rw-r--r-- | src/xine-engine/xine.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 841f966d1..c207680e6 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -629,6 +629,7 @@ xine_stream_t *xine_stream_new (xine_t *this, pthread_mutex_init (&stream->meta_mutex, NULL); pthread_mutex_init (&stream->demux_lock, NULL); pthread_mutex_init (&stream->demux_mutex, NULL); + pthread_cond_init (&stream->demux_resume, NULL); pthread_mutex_init (&stream->event_queues_lock, NULL); pthread_mutex_init (&stream->counter_lock, NULL); pthread_cond_init (&stream->counter_changed, NULL); @@ -1322,6 +1323,7 @@ static int play_internal (xine_stream_t *stream, int start_pos, int start_time) pthread_mutex_lock( &stream->demux_lock ); /* demux_lock taken. now demuxer is suspended */ stream->demux_action_pending = 0; + pthread_cond_signal(&stream->demux_resume); /* set normal speed again (now that demuxer/input pair is suspended) * some input plugin may have changed speed by itself, we must ensure @@ -1448,6 +1450,7 @@ void xine_dispose_internal (xine_stream_t *stream) { pthread_mutex_destroy (&stream->current_extra_info_lock); pthread_cond_destroy (&stream->counter_changed); pthread_mutex_destroy (&stream->demux_mutex); + pthread_cond_destroy (&stream->demux_resume); pthread_mutex_destroy (&stream->demux_lock); pthread_mutex_destroy (&stream->first_frame_lock); pthread_cond_destroy (&stream->first_frame_reached); |