1
0
mirror of https://github.com/rofafor/vdr-plugin-iptv.git synced 2023-10-10 13:37:03 +02:00

Fixed a possible crash in pid scanner.

This commit is contained in:
Rolf Ahrenberg 2009-02-25 22:52:25 +02:00
parent ec2ec19f68
commit 73906ab698
2 changed files with 30 additions and 28 deletions

View File

@ -83,4 +83,4 @@ VDR Plugin 'iptv' Revision History
- Updated for vdr-1.7.4. - Updated for vdr-1.7.4.
- Fixed blacklisting of PAT section filter. - Fixed blacklisting of PAT section filter.
- Set max IPTV device count to VDR's max devices. - Set max IPTV device count to VDR's max devices.
- Fixed a possible crash in sid scanner. - Fixed a possible crash in sid and pid scanners.

View File

@ -120,6 +120,7 @@ void cPidScanner::Process(const uint8_t* buf)
return; return;
} }
cChannel *IptvChannel = Channels.GetByChannelID(channel.GetChannelID()); cChannel *IptvChannel = Channels.GetByChannelID(channel.GetChannelID());
if (IptvChannel) {
int Apids[MAXAPIDS + 1] = { 0 }; // these lists are zero-terminated int Apids[MAXAPIDS + 1] = { 0 }; // these lists are zero-terminated
int Dpids[MAXDPIDS + 1] = { 0 }; int Dpids[MAXDPIDS + 1] = { 0 };
int Spids[MAXSPIDS + 1] = { 0 }; int Spids[MAXSPIDS + 1] = { 0 };
@ -150,6 +151,7 @@ void cPidScanner::Process(const uint8_t* buf)
#else #else
IptvChannel->SetPids(Vpid, Ppid, Apids, ALangs, Dpids, DLangs, Spids, SLangs, Tpid); IptvChannel->SetPids(Vpid, Ppid, Apids, ALangs, Dpids, DLangs, Spids, SLangs, Tpid);
#endif #endif
}
Channels.Unlock(); Channels.Unlock();
process = false; process = false;
} }