Skip to content
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>
(cherry picked from commit 79900ac)
  • Loading branch information...
1 parent f691e85 commit 7f15abd44c5f21c443a2f6820a1e3a2daf9a1be1 Lawrence Rust committed with Mark Kendall Mar 16, 2011
Showing with 7 additions and 2 deletions.
  1. +7 −2 mythtv/libs/libmythfreemheg/Engine.cpp
View
9 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 7f15abd

Please sign in to comment.
Something went wrong with that request. Please try again.