Browse Source

Report ECM caid/pid when they are available or when PMT is changed.

Georgi Chorbadzhiyski 12 years ago
parent
commit
991b07fc16
1 changed files with 6 additions and 6 deletions
  1. 6
    6
      tables.c

+ 6
- 6
tables.c View File

@@ -75,13 +75,13 @@ void process_pmt(struct ts *ts, uint16_t pid, uint8_t *ts_packet) {
75 75
 		pidmap_set(&ts->pidmap, stream->pid); // Data
76 76
 	}
77 77
 
78
-	if (!ts->ecm_caid) {
79
-		ts_get_ecm_info(ts->pmt, ts->req_CA_sys, &ts->ecm_caid, &ts->ecm_pid);
78
+	ts_get_ecm_info(ts->pmt, ts->req_CA_sys, &ts->ecm_caid, &ts->ecm_pid);
79
+	if (ts->ecm_caid) {
80 80
 		char *CA_sys = ts_get_CA_sys_txt(ts_get_CA_sys(ts->ecm_caid));
81
-		ts_LOGf("%s Service : 0x%04x\n", CA_sys, ts->service_id);
82
-		ts_LOGf("%s CA_id   : 0x%04x\n", CA_sys, ts->emm_caid);
83
-		ts_LOGf("%s EMM pid : 0x%04x\n", CA_sys, ts->emm_pid);
84
-		ts_LOGf("%s ECM pid : 0x%04x\n", CA_sys, ts->ecm_pid);
81
+		ts_LOGf("--- | ECM CAID: 0x%04x (%s)\n", ts->ecm_caid, CA_sys);
82
+		ts_LOGf("--- | ECM pid : 0x%04x (%s)\n", ts->ecm_pid, CA_sys);
83
+	} else {
84
+		ts_LOGf("*** | ERROR: Can't detect ECM pid.\n");
85 85
 	}
86 86
 }
87 87
 

Loading…
Cancel
Save