From: Lars Op den Kamp Date: Mon, 27 Feb 2012 13:09:17 +0000 (+0100) Subject: cec: don't try to transmit when the processor is being stopped. X-Git-Tag: upstream/2.2.0~1^2~33^2~23 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=44a1d92aaca0d0428673f5479152bb1994b40f61;p=deb_libcec.git cec: don't try to transmit when the processor is being stopped. --- diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index ae0a013..3568c16 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -886,6 +886,8 @@ bool CCECProcessor::Transmit(const cec_command &data) uint8_t iMaxTries(0); { CLockObject lock(m_mutex); + if (IsStopped()) + return false; LogOutput(data); m_iLastTransmission = GetTimeMs(); if (!m_communication || !m_communication->IsOpen()) @@ -1564,10 +1566,10 @@ bool CCECProcessor::SetConfiguration(const libcec_configuration *configuration) if (bReinit) { - if (bDeviceTypeChanged) - return ChangeDeviceType(oldPrimaryType, m_configuration.deviceTypes[0]); - else if (bPhysicalAddressChanged) - return SetPhysicalAddress(m_configuration.iPhysicalAddress); + if (bDeviceTypeChanged) + return ChangeDeviceType(oldPrimaryType, m_configuration.deviceTypes[0]); + else if (bPhysicalAddressChanged) + return SetPhysicalAddress(m_configuration.iPhysicalAddress); else return SetHDMIPort(m_configuration.baseDevice, m_configuration.iHDMIPort); }