diff options
Diffstat (limited to 'src/input/input_rtp.c')
-rw-r--r-- | src/input/input_rtp.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/input/input_rtp.c b/src/input/input_rtp.c index 31dcf403d..eaebb5a8f 100644 --- a/src/input/input_rtp.c +++ b/src/input/input_rtp.c @@ -270,6 +270,7 @@ static int rtp_plugin_open (input_plugin_t *this_gen, char *mrl ) { char *pptr; int port = 7658; pthread_attr_t thread_attrs; + int err; this->mrl = mrl; @@ -309,8 +310,12 @@ static int rtp_plugin_open (input_plugin_t *this_gen, char *mrl ) { pthread_cond_init(&this->buffer_notempty, NULL); pthread_attr_init(&thread_attrs); pthread_attr_setdetachstate(&thread_attrs, PTHREAD_CREATE_DETACHED); - pthread_create(&this->reader_thread, &thread_attrs, - input_plugin_read_loop, (void *)&this); + if ((err = pthread_create(&this->reader_thread, &thread_attrs, + input_plugin_read_loop, (void *)&this)) != 0) { + fprintf (stderr, "input_rtp: can't create new thread (%s)\n", + strerror(err)); + exit (1); + } pthread_attr_destroy(&thread_attrs); return 1; |