CComponentsTimer: move pthread members into startTimer()

Origin commit data
------------------
Branch: ni/coolstream
Commit: 012c699951
Author: Thilo Graf <dbt@novatux.de>
Date: 2015-01-20 (Tue, 20 Jan 2015)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
2015-01-20 12:21:44 +01:00
parent 4607a0acb1
commit f61187c9d5

View File

@@ -55,9 +55,6 @@ CComponentsTimer::~CComponentsTimer()
//thread handle
void* CComponentsTimer::initTimerThread(void *arg)
{
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,0);
pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS,0);
CComponentsTimer *timer = static_cast<CComponentsTimer*>(arg);
//start loop
@@ -76,6 +73,9 @@ bool CComponentsTimer::startTimer()
{
void *ptr = static_cast<void*>(this);
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,0);
pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS,0);
if(!tm_thread) {
int res = pthread_create (&tm_thread, NULL, initTimerThread, ptr) ;
if (res != 0){