summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPetri Hintukainen <phintuka@users.sourceforge.net>2012-06-08 11:04:53 +0300
committerPetri Hintukainen <phintuka@users.sourceforge.net>2012-06-08 11:04:53 +0300
commit48ae26609b21739f64863dc3d7dd54ede8cdd1ed (patch)
treeb059d028839cded449f234332cb38d820a475891 /src
parenteb47c6a1a57022606002bb0661ee443420d9d23f (diff)
parent230bccb2dcdaed84ce9820b13c4dc1f58eacb13a (diff)
downloadxine-lib-48ae26609b21739f64863dc3d7dd54ede8cdd1ed.tar.gz
xine-lib-48ae26609b21739f64863dc3d7dd54ede8cdd1ed.tar.bz2
Merge from 1.1
Diffstat (limited to 'src')
-rw-r--r--src/xine-engine/audio_decoder.c4
-rw-r--r--src/xine-engine/audio_out.c2
-rw-r--r--src/xine-engine/video_decoder.c4
-rw-r--r--src/xine-engine/video_out.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c
index 39604ee9b..b7c256d0b 100644
--- a/src/xine-engine/audio_decoder.c
+++ b/src/xine-engine/audio_decoder.c
@@ -467,7 +467,7 @@ static void *audio_decoder_loop (void *stream_gen) {
int _x_audio_decoder_init (xine_stream_t *stream) {
pthread_attr_t pth_attrs;
-#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING > 0)
struct sched_param pth_params;
#endif
int err;
@@ -507,7 +507,7 @@ int _x_audio_decoder_init (xine_stream_t *stream) {
*/
pthread_attr_init(&pth_attrs);
-#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING > 0)
pthread_attr_getschedparam(&pth_attrs, &pth_params);
pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER);
pthread_attr_setschedparam(&pth_attrs, &pth_params);
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c
index 1a2e8aa5c..86b4d7830 100644
--- a/src/xine-engine/audio_out.c
+++ b/src/xine-engine/audio_out.c
@@ -2307,7 +2307,7 @@ xine_audio_port_t *_x_ao_new_port (xine_t *xine, ao_driver_t *driver,
this->audio_loop_running = 1;
pthread_attr_init(&pth_attrs);
-#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING > 0)
pthread_attr_setscope(&pth_attrs, PTHREAD_SCOPE_SYSTEM);
#endif
diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c
index 7b0ac72c1..d6f88cda5 100644
--- a/src/xine-engine/video_decoder.c
+++ b/src/xine-engine/video_decoder.c
@@ -519,7 +519,7 @@ int _x_video_decoder_init (xine_stream_t *stream) {
} else {
pthread_attr_t pth_attrs;
-#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING > 0)
struct sched_param pth_params;
#endif
int err, num_buffers;
@@ -550,7 +550,7 @@ 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
+#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING > 0)
pthread_attr_getschedparam(&pth_attrs, &pth_params);
pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER);
pthread_attr_setschedparam(&pth_attrs, &pth_params);
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c
index cc428137e..8a2cc4bc3 100644
--- a/src/xine-engine/video_out.c
+++ b/src/xine-engine/video_out.c
@@ -2337,7 +2337,7 @@ xine_video_port_t *_x_vo_new_port (xine_t *xine, vo_driver_t *driver, int grabon
this->grab_only = 0;
pthread_attr_init(&pth_attrs);
-#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
+#if defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING > 0)
pthread_attr_setscope(&pth_attrs, PTHREAD_SCOPE_SYSTEM);
#endif