cec: make SetStreamPath() thread safe. bugzid: 19
[deb_libcec.git] / src / lib / CECProcessor.cpp
index a51abc7917b2fdc48fa4b789e6277027f1f33d1d..a7ff64ca09ea8c42357242b5125c6615b389d14d 100644 (file)
@@ -360,12 +360,7 @@ bool CCECProcessor::SetStreamPath(uint16_t iStreamPath)
   CCECBusDevice *device = GetDeviceByPhysicalAddress(iStreamPath);
   if (device)
   {
-    for (unsigned int iPtr = 0; iPtr < 16; iPtr++)
-      m_busDevices[iPtr]->m_bActiveSource = false;
-
-    device->m_bActiveSource = true;
-    device->m_powerStatus   = CEC_POWER_STATUS_ON;
-
+    device->SetActiveDevice();
     bReturn = true;
   }