Ticket #9587: 21-mheg.diff

File 21-mheg.diff, 1.3 KB (added by Lawrence Rust <lvr@…>, 10 years ago)
  • mythtv/libs/libmythfreemheg/Engine.cpp

    # Fixes a crash when the MHEG stream contain unrecognized content
    # First seen on BBC1 interactive 10-Feb-11
    # Analysis:
    # In Bitmap.cpp MHBitmap::ContentArrived calls MHERROR if content unrecognized
    # In logging.h MHERROR calls throw("Failed") which resulted in an uncaught exception.
    diff --git a/mythtv/libs/libmythfreemheg/Engine.cpp b/mythtv/libs/libmythfreemheg/Engine.cpp
    index 30eff93..fce1ea9 100644
    void MHEngine::CheckContentRequests() 
    708708        if (m_Context->CheckCarouselObject(pContent->m_FileName) &&
    709709            m_Context->GetCarouselData(pContent->m_FileName, text))
    710710        {
    711             pContent->m_pRequester->ContentArrived((const unsigned char *)text.data(),
    712                                                    text.size(), this);
     711            // If the content is not recognized catch the exception and continue
     712            try {
     713                pContent->m_pRequester->ContentArrived((const unsigned char *)text.data(),
     714                                                       text.size(), this);
     715            }
     716            catch (char const *) {
     717            }
    713718            // Remove from the list.
    714719            delete pContent;
    715720            it = m_ExternContentTable.erase(it);