summaryrefslogtreecommitdiff
path: root/src/demuxers/demux_mpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/demuxers/demux_mpeg.c')
-rw-r--r--src/demuxers/demux_mpeg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c
index fd392b80c..7054923ec 100644
--- a/src/demuxers/demux_mpeg.c
+++ b/src/demuxers/demux_mpeg.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_mpeg.c,v 1.80 2002/10/06 03:48:13 komadori Exp $
+ * $Id: demux_mpeg.c,v 1.81 2002/10/12 17:11:58 jkeil Exp $
*
* demultiplexer for mpeg 1/2 program streams
* reads streams of variable blocksizes
@@ -35,6 +35,7 @@
#include <fcntl.h>
#include <unistd.h>
#include <pthread.h>
+#include <sched.h>
#include <string.h>
#include <unistd.h>
@@ -774,6 +775,8 @@ static void *demux_mpeg_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 );
}