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:34:06 (GMT)
commit79900aca5d81dd2ab1c33012c5796d2cd874130b (patch)
tree7c0248c60b476c623e9afe50058f22f784471bc6
parentcf64c8b00f3d945a6049baf4dfd6cc295ea7ba52 (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>
-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);