don't update the power status when the stream path is reset
[deb_libcec.git] / src / lib / devices / CECBusDevice.cpp
index b304cb9c3e1a902b9a0ae2c0652fa93857bbb8ac..e9cc13b93f79974bbc34866687dfb1ac8352c8bc 100644 (file)
@@ -643,6 +643,8 @@ bool CCECBusDevice::RequestPowerStatus(const cec_logical_address initiator, bool
   {
     MarkBusy();
     bReturn = m_handler->TransmitRequestPowerStatus(initiator, m_iLogicalAddress, bWaitForResponse);
+    if (!bReturn)
+      SetPowerStatus(CEC_POWER_STATUS_UNKNOWN);
     MarkReady();
   }
   return bReturn;
@@ -1144,7 +1146,8 @@ void CCECBusDevice::SetActiveRoute(uint16_t iRoute)
 
 void CCECBusDevice::SetStreamPath(uint16_t iNewAddress, uint16_t iOldAddress /* = CEC_INVALID_PHYSICAL_ADDRESS */)
 {
-  SetPowerStatus(CEC_POWER_STATUS_ON);
+  if (iNewAddress != CEC_INVALID_PHYSICAL_ADDRESS)
+    SetPowerStatus(CEC_POWER_STATUS_ON);
 
   CLockObject lock(m_mutex);
   if (iNewAddress != m_iStreamPath)