comparison recpt1/tssplitter_lite.c @ 104:afd25d9ebef6

output ECM packet so that former workaround is no longer needed.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Fri, 26 Feb 2010 22:55:44 +0900
parents 3f7288b0672c
children 12b9192becaa
comparison
equal deleted inserted replaced
103:387d18563ef8 104:afd25d9ebef6
594 pcr = GetPid(&buf[13]); 594 pcr = GetPid(&buf[13]);
595 sp->pids[pcr] = 1; 595 sp->pids[pcr] = 1;
596 596
597 N = ((buf[15] & 0x0F) << 4) + buf[16] + 16 + 1; 597 N = ((buf[15] & 0x0F) << 4) + buf[16] + 16 + 1;
598 598
599 // ECM
600 int p = 17;
601 while(p < N) {
602 uint32_t ca_pid;
603 uint32_t tag;
604 uint32_t len;
605
606 tag = buf[p];
607 len = buf[p+1];
608 if(tag == 0x09 && len >= 4 && p+len <= N) {
609 ca_pid = ((buf[p+4] << 8) | buf[p+5]) & 0x1fff;
610 sp->pids[ca_pid] = 1;
611 }
612 p += len;
613 }
614
599 // ES PID 615 // ES PID
600 while (N < Nall + 8 - 4) 616 while (N < Nall + 8 - 4)
601 { 617 {
602 // ストリーム種別が 0x0D(type D)は出力対象外 618 // ストリーム種別が 0x0D(type D)は出力対象外
603 if (0x0D != buf[N]) 619 if (0x0D != buf[N])