Skip to content

Commit

Permalink
Make IPTV PAT parser skip over services with service_id set to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
andoma committed Jan 9, 2011
1 parent 2dc06ed commit cc42203
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/iptv_input.c
Expand Up @@ -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;
}
}


Expand Down

0 comments on commit cc42203

Please sign in to comment.