[Live-devel] SingleStep(): select() fails: Bad file descriptor

Sharmistha Chatterjee sharmi.chatterjee at gmail.com
Thu Dec 18 07:14:19 PST 2014


Hi All,

I am using live555ProxyServer in my multi-threaded application..The
application will only use a single instance of proxyServer from only one of
its thread. (no multi-thread handling of live555)

I ran the proxyServer provided in the example, and was able to stream
successfully from a VLC client. Then I changed the live555ProxyServer.cpp
to start the event-loop from a pthread.

The arvg argument of main was passed to the thread as void * and casted
back inside the threadFunc.  argv variables are coming correctly inside
threadfunc .

Also the TaskScheduler and BasicUsage environment variable was created
inside the pthread. In other words, all the code from main function has
been moved to a pthread.

The event loop crashes inside BasicTaskScheduler:SingleStep.

Can anyone please help with this problem, why it happens when I call
eventloop from pthread func

int main(int argc, char** argv) {

   pthread_t tid;
   void *status;
   pthread_create(&tid, NULL, threadfun,  (void *)argv);
   printf("Created Pthread %d\n",*(int*)status);

}

Regards,
sharmistha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20141218/068dacbb/attachment.html>


More information about the live-devel mailing list