framework/media : fix a logical error at MediaWorker::startWorker()
Even though a worker thread creation fails, the flag of 'mIsRunning' is set to true.
Fix this logical error by updating 'mIsRunning' to false in case that the thread creation fails.
@@ -45,6 +45,7 @@ void MediaWorker::startWorker()
if (ret != OK) {
medvdbg("Fail to create worker thread, return value : %d\n", ret);
--mRefCnt;
+ mIsRunning = false;
return;
}
pthread_setname_np(mWorkerThread, mThreadName);
