diff --git a/player.c b/player.c index fcca3487..3b28eee2 100644 --- a/player.c +++ b/player.c @@ -36,12 +36,13 @@ #include #include #include -#include +#include #include #include #include #include #include +#include #include "config.h" @@ -1104,7 +1105,15 @@ int player_play(stream_cfg *stream) { if (rc) debug(1,"Error initialising condition variable."); config.output->start(sampling_rate); - pthread_create(&player_thread, NULL, player_thread_func, NULL); + + size_t size = (PTHREAD_STACK_MIN + 128 * 1024); + pthread_attr_t tattr; + pthread_attr_init(&tattr); + rc = pthread_attr_setstacksize(&tattr, size); + if (rc) + debug(1, "Error setting stack size for player_thread: %s", strerror(errno)); + pthread_create(&player_thread, &tattr, player_thread_func, NULL); + pthread_attr_destroy(&tattr); return 0; } diff --git a/rtsp.c b/rtsp.c index 91e0728e..379662a2 100644 --- a/rtsp.c +++ b/rtsp.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include "config.h"