From 0314fd1631454084e823e94918edb79019b96e63 Mon Sep 17 00:00:00 2001 From: Juergen Keil Date: Sat, 12 Oct 2002 17:11:58 +0000 Subject: While the demuxer mutex is unlocked, relinquish the processor in the main demuxer loop, otherwise (on solaris) demux_*_stop() has no chance to lock the mutex and change the demuxer status variable for interrupting the demuxer. Fixes xine_stop() problems on solaris. CVS patchset: 2815 CVS date: 2002/10/12 17:11:58 --- src/demuxers/demux_qt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/demuxers/demux_qt.c') diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index 99f41e89d..7786b830d 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.c @@ -30,7 +30,7 @@ * build_frame_table * free_qt_info * - * $Id: demux_qt.c,v 1.95 2002/10/08 12:45:58 jkeil Exp $ + * $Id: demux_qt.c,v 1.96 2002/10/12 17:11:58 jkeil Exp $ * */ @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -661,7 +662,7 @@ static qt_error parse_trak_atom(qt_sample_table *sample_table, /* fetch audio parameters */ sample_table->media_description.audio.codec_format = - ME_32(&trak_atom[i + 0x10]); + ME_32(&trak_atom[i + 0x10]); sample_table->media_description.audio.sample_rate = BE_16(&trak_atom[i + 0x2C]); sample_table->media_description.audio.channels = trak_atom[i + 0x25]; @@ -1437,6 +1438,8 @@ static void *demux_qt_loop (void *this_gen) { /* someone may want to interrupt us */ pthread_mutex_unlock( &this->mutex ); + /* give demux_*_stop a chance to interrupt us */ + sched_yield(); pthread_mutex_lock( &this->mutex ); i = this->current_frame; -- cgit v1.2.3