bParseFrame = ParseMessage(msg);
}
- if (bParseFrame)
+ if (!m_bStop && bParseFrame)
ParseCurrentFrame();
- m_controller->CheckKeypressTimeout();
- CCondition::Sleep(50);
+ if (!m_bStop)
+ {
+ m_controller->CheckKeypressTimeout();
+ CCondition::Sleep(50);
+ }
}
- m_controller->AddLog(CEC_LOG_DEBUG, "processor thread terminated");
return NULL;
}
void CLibCEC::Close(void)
{
if (m_cec)
+ {
m_cec->StopThread();
+ delete m_cec;
+ m_cec = NULL;
+ }
if (m_comm)
+ {
m_comm->Close();
+ delete m_comm;
+ m_comm = NULL;
+ }
}
int CLibCEC::FindAdapters(std::vector<cec_adapter> &deviceList, const char *strDevicePath /* = NULL */)