summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThibaut Mattern <tmattern@users.sourceforge.net>2002-10-31 21:58:41 +0000
committerThibaut Mattern <tmattern@users.sourceforge.net>2002-10-31 21:58:41 +0000
commit9d86dca48419b4dd4bbaa3dd0f855c3d12f38605 (patch)
tree5ff1369a0b2cb1b0a0c7631cdc8410eb1646ae59 /src
parent14d7d57c8e8610de8df48d6555015cbc0c2e7201 (diff)
downloadxine-lib-9d86dca48419b4dd4bbaa3dd0f855c3d12f38605.tar.gz
xine-lib-9d86dca48419b4dd4bbaa3dd0f855c3d12f38605.tar.bz2
Little optimization.
CVS patchset: 3116 CVS date: 2002/10/31 21:58:41
Diffstat (limited to 'src')
-rw-r--r--src/xine-engine/demux.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xine-engine/demux.c b/src/xine-engine/demux.c
index 4f7ee1dca..f4d7c0679 100644
--- a/src/xine-engine/demux.c
+++ b/src/xine-engine/demux.c
@@ -158,14 +158,14 @@ static void *demux_loop (void *stream_gen) {
status = stream->demux_plugin->send_chunk(stream->demux_plugin);
/* someone may want to interrupt us */
- pthread_mutex_unlock( &stream->demux_lock );
if( stream->demux_action_pending ) {
+ pthread_mutex_unlock( &stream->demux_lock );
#ifdef LOG
printf ("demux: sched_yield\n");
#endif
sched_yield();
+ pthread_mutex_lock( &stream->demux_lock );
}
- pthread_mutex_lock( &stream->demux_lock );
}
#ifdef LOG
@@ -211,7 +211,9 @@ int xine_demux_start_thread (xine_stream_t *stream) {
printf ("demux: start thread called\n");
#endif
+ stream->demux_action_pending = 1;
pthread_mutex_lock( &stream->demux_lock );
+ stream->demux_action_pending = 0;
if( !stream->demux_thread_running ) {