zapit: try to fix ait segfault

This commit is contained in:
Jacek Jendrzej
2021-10-14 16:38:30 +02:00
parent ae29bfc7a6
commit 6102611c5f
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) for (sit = sections.begin(); sit != sections.end(); ++sit)
{ {
if (CServiceScan::getInstance()->Aborted()) if (CServiceScan::getInstance()->Aborted()){
return false; if (pFile)
fclose(pFile);
return false;
}
std::list<ApplicationInformation *>::const_iterator i = (*sit)->getApplicationInformation()->begin(); std::list<ApplicationInformation *>::const_iterator i = (*sit)->getApplicationInformation()->begin();
sectionLength = (*sit)->getSectionLength() + 3; 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 */ /* hack. if standby, dont blank video -> for paused timeshift */
videoDecoder->Stop(standby ? false : blank); videoDecoder->Stop(standby ? false : blank);
#if ENABLE_AIT
ait->Stop();
#endif
#ifdef USE_VBI #ifdef USE_VBI
videoDecoder->StopVBI(); videoDecoder->StopVBI();
#endif #endif