cec: get the physical address of the target device before without holding a lock...
authorLars Op den Kamp <lars@opdenkamp.eu>
Tue, 3 Jan 2012 16:18:03 +0000 (17:18 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Tue, 3 Jan 2012 16:20:56 +0000 (17:20 +0100)
src/lib/CECProcessor.cpp

index e0a32a8c0d26e7646396d3146ee768c48684a52c..5071ec6ee3f8b87818b8f5733694fedf030126d2 100644 (file)
@@ -510,7 +510,11 @@ bool CCECProcessor::SetHDMIPort(cec_logical_address iBaseDevice, uint8_t iPort,
 
   uint16_t iPhysicalAddress(0);
   if (iBaseDevice > CECDEVICE_TV)
+  {
+    lock.Leave();
     iPhysicalAddress = m_busDevices[iBaseDevice]->GetPhysicalAddress();
+    lock.Lock();
+  }
 
   if (iPhysicalAddress < 0xffff)
   {