CEC Configuration: Only update the physical address when it has actually
authorMark Kendall <mkendall@mythtv.org>
Mon, 2 Apr 2012 16:12:51 +0000 (17:12 +0100)
committerMark Kendall <mkendall@mythtv.org>
Mon, 2 Apr 2012 16:12:51 +0000 (17:12 +0100)
changed.

bugzid: 672

src/lib/CECProcessor.cpp

index 20ae10abd71ac33dc3059272d53650107070c884..59a537f63c78c38c922106808a7c0f1ed26c317a 100644 (file)
@@ -1556,9 +1556,12 @@ bool CCECProcessor::SetConfiguration(const libcec_configuration *configuration)
   {
     if (configuration->iPhysicalAddress != 0)
       bPhysicalAddressChanged = IsRunning() && m_configuration.iPhysicalAddress != configuration->iPhysicalAddress;
-    if (IsRunning())
-      CLibCEC::AddLog(CEC_LOG_DEBUG, "%s - using physical address '%4x'", __FUNCTION__, configuration->iPhysicalAddress);
-    m_configuration.iPhysicalAddress = configuration->iPhysicalAddress;
+    if (bPhysicalAddressChanged)
+    {
+      if (IsRunning())
+        CLibCEC::AddLog(CEC_LOG_DEBUG, "%s - using physical address '%4x'", __FUNCTION__, configuration->iPhysicalAddress);
+      m_configuration.iPhysicalAddress = configuration->iPhysicalAddress;
+    }
   }
 
   bool bHdmiPortChanged(false);