Permalink
Browse files

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>
  • Loading branch information...
Lawrence Rust Mark Kendall
Lawrence Rust authored and Mark Kendall committed Mar 16, 2011
1 parent cf64c8b commit 79900aca5d81dd2ab1c33012c5796d2cd874130b
Showing with 7 additions and 2 deletions.
  1. +7 −2 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);

0 comments on commit 79900ac

Please sign in to comment.