Browse Source

Fix PUSI check.

Georgi Chorbadzhiyski 13 years ago
parent
commit
27130f24ca
8 changed files with 8 additions and 8 deletions
  1. 1
    1
      cat.c
  2. 1
    1
      eit.c
  3. 1
    1
      nit.c
  4. 1
    1
      pat.c
  5. 1
    1
      pmt.c
  6. 1
    1
      privsec.c
  7. 1
    1
      sdt.c
  8. 1
    1
      tdt.c

+ 1
- 1
cat.c View File

@@ -48,7 +48,7 @@ struct ts_cat *ts_cat_push_packet(struct ts_cat *cat, uint8_t *ts_packet) {
48 48
 
49 49
 	if (ts_packet_header_parse(ts_packet, &ts_header)) {
50 50
 		// Received PUSI packet before table END, clear the table to start gathering new one
51
-		if (cat->ts_header.pusi)
51
+		if (ts_header.pusi && cat->ts_header.pusi)
52 52
 			ts_cat_clear(cat);
53 53
 		if (!cat->ts_header.pusi)
54 54
 			cat->ts_header = ts_header;

+ 1
- 1
eit.c View File

@@ -68,7 +68,7 @@ struct ts_eit *ts_eit_push_packet(struct ts_eit *eit, uint8_t *ts_packet) {
68 68
 		if (ts_header.pid != 0x12)
69 69
 			goto OUT;
70 70
 		// Received PUSI packet before table END, clear the table to start gathering new one
71
-		if (eit->ts_header.pusi)
71
+		if (ts_header.pusi && eit->ts_header.pusi)
72 72
 			ts_eit_clear(eit);
73 73
 		if (!eit->ts_header.pusi)
74 74
 			eit->ts_header = ts_header;

+ 1
- 1
nit.c View File

@@ -70,7 +70,7 @@ struct ts_nit *ts_nit_push_packet(struct ts_nit *nit, uint8_t *ts_packet) {
70 70
 		if (ts_header.pid != 0x10)
71 71
 			goto OUT;
72 72
 		// Received PUSI packet before table END, clear the table to start gathering new one
73
-		if (nit->ts_header.pusi)
73
+		if (ts_header.pusi && nit->ts_header.pusi)
74 74
 			ts_nit_clear(nit);
75 75
 		if (!nit->ts_header.pusi)
76 76
 			nit->ts_header = ts_header;

+ 1
- 1
pat.c View File

@@ -67,7 +67,7 @@ struct ts_pat *ts_pat_push_packet(struct ts_pat *pat, uint8_t *ts_packet) {
67 67
 		if (ts_header.pid != 0x00)
68 68
 			goto OUT;
69 69
 		// Received PUSI packet before table END, clear the table to start gathering new one
70
-		if (pat->ts_header.pusi)
70
+		if (ts_header.pusi && pat->ts_header.pusi)
71 71
 			ts_pat_clear(pat);
72 72
 		if (!pat->ts_header.pusi)
73 73
 			pat->ts_header = ts_header;

+ 1
- 1
pmt.c View File

@@ -68,7 +68,7 @@ struct ts_pmt *ts_pmt_push_packet(struct ts_pmt *pmt, uint8_t *ts_packet) {
68 68
 
69 69
 	if (ts_packet_header_parse(ts_packet, &ts_header)) {
70 70
 		// Received PUSI packet before table END, clear the table to start gathering new one
71
-		if (pmt->ts_header.pusi)
71
+		if (ts_header.pusi && pmt->ts_header.pusi)
72 72
 			ts_pmt_clear(pmt);
73 73
 		if (!pmt->ts_header.pusi)
74 74
 			pmt->ts_header = ts_header;

+ 1
- 1
privsec.c View File

@@ -54,7 +54,7 @@ struct ts_privsec *ts_privsec_push_packet(struct ts_privsec *privsec, uint8_t *t
54 54
 
55 55
 	if (ts_packet_header_parse(ts_packet, &ts_header)) {
56 56
 		// Received PUSI packet before table END, clear the table to start gathering new one
57
-		if (privsec->ts_header.pusi)
57
+		if (ts_header.pusi && privsec->ts_header.pusi)
58 58
 			ts_privsec_clear(privsec);
59 59
 		if (!privsec->ts_header.pusi)
60 60
 			privsec->ts_header = ts_header;

+ 1
- 1
sdt.c View File

@@ -68,7 +68,7 @@ struct ts_sdt *ts_sdt_push_packet(struct ts_sdt *sdt, uint8_t *ts_packet) {
68 68
 		if (ts_header.pid != 0x11)
69 69
 			goto OUT;
70 70
 		// Received PUSI packet before table END, clear the table to start gathering new one
71
-		if (sdt->ts_header.pusi)
71
+		if (ts_header.pusi && sdt->ts_header.pusi)
72 72
 			ts_sdt_clear(sdt);
73 73
 		if (!sdt->ts_header.pusi)
74 74
 			sdt->ts_header = ts_header;

+ 1
- 1
tdt.c View File

@@ -52,7 +52,7 @@ struct ts_tdt *ts_tdt_push_packet(struct ts_tdt *tdt, uint8_t *ts_packet) {
52 52
 		if (ts_header.pid != 0x14)
53 53
 			goto OUT;
54 54
 		// Received PUSI packet before table END, clear the table to start gathering new one
55
-		if (tdt->ts_header.pusi)
55
+		if (ts_header.pusi && tdt->ts_header.pusi)
56 56
 			ts_tdt_clear(tdt);
57 57
 		if (!tdt->ts_header.pusi)
58 58
 			tdt->ts_header = ts_header;

Loading…
Cancel
Save