zapit: try to fix ait segfault

Origin commit data
------------------
Commit: 0396bd7436
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2021-10-14 (Thu, 14 Oct 2021)
This commit is contained in:
Jacek Jendrzej
2021-10-14 21:32:21 +02:00
committed by vanhofen
parent a2b4d06074
commit ccf28b15db
2 changed files with 8 additions and 2 deletions

View File

@@ -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<ApplicationInformation *>::const_iterator i = (*sit)->getApplicationInformation()->begin();
sectionLength = (*sit)->getSectionLength() + 3;

View File

@@ -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