From: Petri H. <phi...@us...> - 2012-06-08 08:18:44
|
# HG changeset patch # User Petri Hintukainen <phi...@us...> # Date 1339142693 -10800 # Node ID bdafef29aa2ffe178f7d2586182eaa415205a132 # Branch default # Parent 5ea1f935cb40964a1eb9befd27cb6299e2c7f12e # Parent 146e325cb3bfc960f9b7b677695563da6cfe30b5 Merge from 1.1 diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c --- a/src/xine-engine/audio_decoder.c +++ b/src/xine-engine/audio_decoder.c @@ -467,7 +467,7 @@ 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 @@ */ 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); --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -2307,7 +2307,7 @@ 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 --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c --- a/src/xine-engine/video_decoder.c +++ b/src/xine-engine/video_decoder.c @@ -519,7 +519,7 @@ } 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 @@ 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); --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c --- a/src/xine-engine/video_out.c +++ b/src/xine-engine/video_out.c @@ -2337,7 +2337,7 @@ 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 |