From 8197bba65aa8c1b71261a0f22131251014e227fc Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 21 Jan 2005 18:47:54 +0000 Subject: 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 --- src/xine-engine/xine.c | 8 +++++--- 1 file 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); -- cgit v1.2.3