diff --git a/packages/mediacenter/xbmc/patches/xbmc-990.21-cec-extra-guards-around-m_queryThread.patch b/packages/mediacenter/xbmc/patches/xbmc-990.21-cec-extra-guards-around-m_queryThread.patch new file mode 100644 index 0000000000..e882e54d75 --- /dev/null +++ b/packages/mediacenter/xbmc/patches/xbmc-990.21-cec-extra-guards-around-m_queryThread.patch @@ -0,0 +1,51 @@ +From 5385b26621a8d966f187f7b63dfaa8f336beb9a5 Mon Sep 17 00:00:00 2001 +From: Lars Op den Kamp +Date: Tue, 12 Mar 2013 10:20:27 +0100 +Subject: [PATCH] [cec] extra guards around m_queryThread + +--- + xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +index 4cdd3c4..6509c5d 100644 +--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp ++++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +@@ -99,8 +99,8 @@ class DllLibCEC : public DllDynamic, DllLibCECInterface + m_bStop = true; + } + +- SAFE_DELETE(m_queryThread); + StopThread(true); ++ delete m_queryThread; + + if (m_dll && m_cecAdapter) + { +@@ -389,7 +389,7 @@ void CPeripheralCecAdapter::Process(void) + Sleep(5); + } + +- SAFE_DELETE(m_queryThread); ++ m_queryThread->StopThread(true); + + bool bSendStandbyCommands(false); + { +@@ -1105,9 +1105,12 @@ void CPeripheralCecAdapter::OnSettingChanged(const CStdString &strChangedSetting + } + else if (IsRunning()) + { +- CLog::Log(LOGDEBUG, "%s - sending the updated configuration to libCEC", __FUNCTION__); +- SetConfigurationFromSettings(); +- m_queryThread->UpdateConfiguration(&m_configuration); ++ if (m_queryThread->IsRunning()) ++ { ++ CLog::Log(LOGDEBUG, "%s - sending the updated configuration to libCEC", __FUNCTION__); ++ SetConfigurationFromSettings(); ++ m_queryThread->UpdateConfiguration(&m_configuration); ++ } + } + else + { +-- +1.7.10 + diff --git a/packages/mediacenter/xbmc/patches/xbmc-990.22-cec-init_m_queryThread_to_NULL.patch b/packages/mediacenter/xbmc/patches/xbmc-990.22-cec-init_m_queryThread_to_NULL.patch new file mode 100644 index 0000000000..2145ca975b --- /dev/null +++ b/packages/mediacenter/xbmc/patches/xbmc-990.22-cec-init_m_queryThread_to_NULL.patch @@ -0,0 +1,25 @@ +From 9526c4ce7da5c70d8ba79a5c21e9d95c918ebadb Mon Sep 17 00:00:00 2001 +From: Lars Op den Kamp +Date: Tue, 12 Mar 2013 11:08:55 +0100 +Subject: [PATCH] [cec] and let's init m_queryThread to NULL so we won't crash + on exit when CEC has been disabled + +--- + xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +index 6509c5d..61233bb 100644 +--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp ++++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp +@@ -135,6 +135,7 @@ void CPeripheralCecAdapter::ResetMembers(void) + m_bActiveSourceBeforeStandby = false; + m_bOnPlayReceived = false; + m_bPlaybackPaused = false; ++ m_queryThread = NULL; + + m_currentButton.iButton = 0; + m_currentButton.iDuration = 0; +-- +1.7.10 + diff --git a/packages/mediacenter/xbmc/patches/xbmc-990.23-Fix_code_generate_problem_with_binary_string.patch b/packages/mediacenter/xbmc/patches/xbmc-990.23-Fix_code_generate_problem_with_binary_string.patch new file mode 100644 index 0000000000..56420955ee --- /dev/null +++ b/packages/mediacenter/xbmc/patches/xbmc-990.23-Fix_code_generate_problem_with_binary_string.patch @@ -0,0 +1,22 @@ +From 1a5e251cc4382ad3e918af68072f2ba08e26574b Mon Sep 17 00:00:00 2001 +From: ulion +Date: Tue, 12 Mar 2013 06:40:54 +0800 +Subject: [PATCH] Fix code generate problem with binary string. + +--- + xbmc/interfaces/python/typemaps/python.string.outtm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xbmc/interfaces/python/typemaps/python.string.outtm b/xbmc/interfaces/python/typemaps/python.string.outtm +index cdfba2e..c396166 100644 +--- a/xbmc/interfaces/python/typemaps/python.string.outtm ++++ b/xbmc/interfaces/python/typemaps/python.string.outtm +@@ -22,4 +22,4 @@ + %> + ${result} = <% + if(method.@feature_python_coerceToUnicode) { %>PyUnicode_DecodeUTF8(${api}.c_str(),${api}.size(),"replace");<% } +- else { %>PyString_FromString(${api}.c_str());<% } %> ++ else { %>PyString_FromStringAndSize(${api}.c_str(), ${api}.length());<% } %> +-- +1.7.10 +