diff options
author | Bastien Nocera <hadess@users.sourceforge.net> | 2005-01-21 18:47:54 +0000 |
---|---|---|
committer | Bastien Nocera <hadess@users.sourceforge.net> | 2005-01-21 18:47:54 +0000 |
commit | 8197bba65aa8c1b71261a0f22131251014e227fc (patch) | |
tree | 4d23a5e8fd47fe3f89a765228eba35d271f45912 | |
parent | 23750344872929cad2673bba0b82fd41b4d9a76c (diff) | |
download | xine-lib-8197bba65aa8c1b71261a0f22131251014e227fc.tar.gz xine-lib-8197bba65aa8c1b71261a0f22131251014e227fc.tar.bz2 |
Don't wait for events to be flush to the events thread if we don't have
any. Fixes the bug discussed in:
http://thread.gmane.org/gmane.comp.video.xine.devel/12305
CVS patchset: 7365
CVS date: 2005/01/21 18:47:54
-rw-r--r-- | src/xine-engine/xine.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index b76f8b32e..fc744bcfd 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.307 2005/01/18 22:38:31 holstsn Exp $ + * $Id: xine.c,v 1.308 2005/01/21 18:47:54 hadess Exp $ */ /* @@ -625,8 +625,10 @@ void _x_flush_events_queues (xine_stream_t *stream) { pthread_mutex_lock (&queue->lock); pthread_mutex_unlock (&stream->event_queues_lock); - while (!xine_list_is_empty (queue->events)) { - pthread_cond_wait (&queue->events_processed, &queue->lock); + if (queue->listener_thread != NULL) { + while (!xine_list_is_empty (queue->events)) { + pthread_cond_wait (&queue->events_processed, &queue->lock); + } } pthread_mutex_unlock (&queue->lock); |