summaryrefslogtreecommitdiff
path: root/src/xine-engine/video_decoder.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xine-engine/video_decoder.c')
-rw-r--r--src/xine-engine/video_decoder.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c
index 0756fc5b2..f70bb82bb 100644
--- a/src/xine-engine/video_decoder.c
+++ b/src/xine-engine/video_decoder.c
@@ -41,6 +41,10 @@
#define SPU_SLEEP_INTERVAL (90000/2)
+#ifndef SCHED_OTHER
+#define SCHED_OTHER 0
+#endif
+
static void update_spu_decoder (xine_stream_t *stream, int type) {
@@ -486,7 +490,9 @@ int _x_video_decoder_init (xine_stream_t *stream) {
} else {
pthread_attr_t pth_attrs;
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
struct sched_param pth_params;
+#endif
int err, num_buffers;
/* The fifo size is based on dvd playback where buffers are filled
* with 2k of data. With 500 buffers and a typical video data rate
@@ -515,10 +521,12 @@ int _x_video_decoder_init (xine_stream_t *stream) {
stream->spu_track_map_entries = 0;
pthread_attr_init(&pth_attrs);
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
pthread_attr_getschedparam(&pth_attrs, &pth_params);
pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER);
pthread_attr_setschedparam(&pth_attrs, &pth_params);
pthread_attr_setscope(&pth_attrs, PTHREAD_SCOPE_SYSTEM);
+#endif
stream->video_thread_created = 1;
if ((err = pthread_create (&stream->video_thread,