Make IPTV PAT parser skip over services with service_id set to 0
Ticket #318
This commit is contained in:
parent
2dc06edcf7
commit
cc42203b53
1 changed files with 10 additions and 5 deletions
|
@ -60,13 +60,18 @@ iptv_got_pat(const uint8_t *ptr, size_t len, void *aux)
|
|||
len -= 8;
|
||||
ptr += 8;
|
||||
|
||||
if(len < 4)
|
||||
return;
|
||||
while(len >= 4) {
|
||||
|
||||
prognum = ptr[0] << 8 | ptr[1];
|
||||
pmt = (ptr[2] & 0x1f) << 8 | ptr[3];
|
||||
prognum = ptr[0] << 8 | ptr[1];
|
||||
pmt = (ptr[2] & 0x1f) << 8 | ptr[3];
|
||||
|
||||
t->s_pmt_pid = pmt;
|
||||
if(prognum != 0) {
|
||||
t->s_pmt_pid = pmt;
|
||||
return;
|
||||
}
|
||||
ptr += 4;
|
||||
len -= 4;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue