summaryrefslogtreecommitdiff
path: root/src/demuxers/demux_qt.c
diff options
context:
space:
mode:
authorJuergen Keil <jkeil@users.sourceforge.net>2002-10-12 17:11:58 +0000
committerJuergen Keil <jkeil@users.sourceforge.net>2002-10-12 17:11:58 +0000
commit0314fd1631454084e823e94918edb79019b96e63 (patch)
tree16e791f3f11c2571318d3741b27564c61e27093f /src/demuxers/demux_qt.c
parentbf4abc064662be3f8a52a7fcff159e6379800ab9 (diff)
downloadxine-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_qt.c')
-rw-r--r--src/demuxers/demux_qt.c7
1 files changed, 5 insertions, 2 deletions
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 <fcntl.h>
#include <unistd.h>
#include <pthread.h>
+#include <sched.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
@@ -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;