From ccf28b15db84bfefbc6f10d78a069f3c868f1602 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 14 Oct 2021 21:32:21 +0200 Subject: [PATCH] zapit: try to fix ait segfault Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/0396bd7436b949ae2ea98e10c0811bd243c77d5a Author: Jacek Jendrzej Date: 2021-10-14 (Thu, 14 Oct 2021) --- 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 c98a6660b..ef48a7958 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