blob: 206609378d672e252c74dbabe9eac3bb311bbbd6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
$NetBSD: patch-ab,v 1.3 2003/04/11 09:49:20 rh Exp $
--- src/xine-engine/audio_decoder.c.orig 2003-04-06 10:23:10.000000000 +1000
+++ src/xine-engine/audio_decoder.c
@@ -353,7 +353,9 @@ void *audio_decoder_loop (void *stream_g
void audio_decoder_init (xine_stream_t *stream) {
pthread_attr_t pth_attrs;
+#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
struct sched_param pth_params;
+#endif
int err;
if (stream->audio_out == NULL) {
@@ -379,10 +381,12 @@ void audio_decoder_init (xine_stream_t *
*/
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
if ((err = pthread_create (&stream->audio_thread,
&pth_attrs, audio_decoder_loop, stream)) != 0) {
|