summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xine-engine/demux.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/xine-engine/demux.c b/src/xine-engine/demux.c
index bbc130988..68fedbcf4 100644
--- a/src/xine-engine/demux.c
+++ b/src/xine-engine/demux.c
@@ -349,6 +349,10 @@ static void *demux_loop (void *stream_gen) {
gettimeofday(&tv, NULL);
ts.tv_sec = tv.tv_sec;
ts.tv_nsec = (tv.tv_usec + 100000) * 1000;
+ if (ts.tv_nsec >= 1000000000) {
+ ts.tv_nsec -= 1000000000;
+ ts.tv_sec += 1;
+ }
pthread_cond_timedwait (&stream->demux_resume, &stream->demux_lock, &ts);
}