summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLawrence Rust <lvr@softsystem.co.uk>2011-03-16 01:34:06 (GMT)
committer Mark Kendall <mkendall@mythtv.org>2011-03-16 01:35:27 (GMT)
commit7f15abd44c5f21c443a2f6820a1e3a2daf9a1be1 (patch)
tree7595318a65de070a4b125ff028acde52f776d568
parentf691e858f02e2b293f9674786ebd2e9cced0ff1e (diff)
libmythfreemheg: Catch exception for unrecognised content
If an MHEG stream contains unrecognized content (in this case on BBC1 interactive 10-Feb-2011) then MHBitmap::ContentArrived calls MHERROR which in turn throws an exception looking for an external handler. Since there is no exception handler, libc terminates mythfrontend. Signed-off-by: Mark Kendall <mkendall@mythtv.org> (cherry picked from commit 79900aca5d81dd2ab1c33012c5796d2cd874130b)
-rw-r--r--mythtv/libs/libmythfreemheg/Engine.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/mythtv/libs/libmythfreemheg/Engine.cpp b/mythtv/libs/libmythfreemheg/Engine.cpp
index 30eff93..fce1ea9 100644
--- a/mythtv/libs/libmythfreemheg/Engine.cpp
+++ b/mythtv/libs/libmythfreemheg/Engine.cpp
@@ -708,8 +708,13 @@ void MHEngine::CheckContentRequests()
if (m_Context->CheckCarouselObject(pContent->m_FileName) &&
m_Context->GetCarouselData(pContent->m_FileName, text))
{
- pContent->m_pRequester->ContentArrived((const unsigned char *)text.data(),
- text.size(), this);
+ // If the content is not recognized catch the exception and continue
+ try {
+ pContent->m_pRequester->ContentArrived((const unsigned char *)text.data(),
+ text.size(), this);
+ }
+ catch (char const *) {
+ }
// Remove from the list.
delete pContent;
it = m_ExternContentTable.erase(it);