summaryrefslogtreecommitdiff
path: root/src/demuxers/demux_pes.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/demuxers/demux_pes.c')
-rw-r--r--src/demuxers/demux_pes.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/demuxers/demux_pes.c b/src/demuxers/demux_pes.c
index 5500e9c02..bce7d5fa8 100644
--- a/src/demuxers/demux_pes.c
+++ b/src/demuxers/demux_pes.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_pes.c,v 1.38 2002/09/10 15:07:14 mroi Exp $
+ * $Id: demux_pes.c,v 1.39 2002/10/12 17:11:58 jkeil Exp $
*
* demultiplexer for mpeg 2 PES (Packetized Elementary Streams)
* reads streams of variable blocksizes
@@ -34,6 +34,7 @@
#include <fcntl.h>
#include <unistd.h>
#include <pthread.h>
+#include <sched.h>
#include <string.h>
#include <unistd.h>
@@ -327,6 +328,8 @@ static void *demux_pes_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 );
}