diff options
author | Juergen Keil <jkeil@users.sourceforge.net> | 2002-10-12 17:11:58 +0000 |
---|---|---|
committer | Juergen Keil <jkeil@users.sourceforge.net> | 2002-10-12 17:11:58 +0000 |
commit | 0314fd1631454084e823e94918edb79019b96e63 (patch) | |
tree | 16e791f3f11c2571318d3741b27564c61e27093f /src/demuxers/demux_mpgaudio.c | |
parent | bf4abc064662be3f8a52a7fcff159e6379800ab9 (diff) | |
download | xine-lib-0314fd1631454084e823e94918edb79019b96e63.tar.gz xine-lib-0314fd1631454084e823e94918edb79019b96e63.tar.bz2 |
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
Diffstat (limited to 'src/demuxers/demux_mpgaudio.c')
-rw-r--r-- | src/demuxers/demux_mpgaudio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c index 246aae632..0a2eac5d7 100644 --- a/src/demuxers/demux_mpgaudio.c +++ b/src/demuxers/demux_mpgaudio.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: demux_mpgaudio.c,v 1.66 2002/10/06 03:48:13 komadori Exp $ + * $Id: demux_mpgaudio.c,v 1.67 2002/10/12 17:11:58 jkeil Exp $ * * demultiplexer for mpeg audio (i.e. mp3) streams * @@ -31,6 +31,7 @@ #include <fcntl.h> #include <unistd.h> #include <pthread.h> +#include <sched.h> #include <string.h> #include <stdlib.h> @@ -334,6 +335,8 @@ static void *demux_mpgaudio_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 ); } |