From 6102611c5ff88ec4073f837208c643f2eaf1f01c Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 14 Oct 2021 16:38:30 +0200 Subject: [PATCH] zapit: try to fix ait segfault --- src/zapit/src/scanait.cpp | 7 +++++-- src/zapit/src/zapit.cpp | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/zapit/src/scanait.cpp b/src/zapit/src/scanait.cpp index 886ee41dc..3b667d860 100644 --- a/src/zapit/src/scanait.cpp +++ b/src/zapit/src/scanait.cpp @@ -126,9 +126,12 @@ bool CAit::Parse() for (sit = sections.begin(); sit != sections.end(); ++sit) { - if (CServiceScan::getInstance()->Aborted()) - return false; + if (CServiceScan::getInstance()->Aborted()){ + if (pFile) + fclose(pFile); + return false; + } std::list::const_iterator i = (*sit)->getApplicationInformation()->begin(); sectionLength = (*sit)->getSectionLength() + 3; diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index 7f342e110..d2f6cb7d4 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -2429,6 +2429,9 @@ bool CZapit::StopPlayBack(bool send_pmt, bool blank) /* hack. if standby, dont blank video -> for paused timeshift */ videoDecoder->Stop(standby ? false : blank); +#if ENABLE_AIT + ait->Stop(); +#endif #ifdef USE_VBI videoDecoder->StopVBI(); #endif