utils/dvb: Rename pid_table::program_number to service_id
authorMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 9 Jan 2012 11:36:43 +0000 (09:36 -0200)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 9 Jan 2012 11:36:43 +0000 (09:36 -0200)
While some specs use program_number, it is actually the
service_id. So, change it, to avoid confusion.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
utils/dvb/dvb-file.c
utils/dvb/libscan.c
utils/dvb/libscan.h

index ba85095..a0e1c79 100644 (file)
@@ -566,7 +566,7 @@ int store_dvb_channel(struct dvb_file **dvb_file,
 
                for (j = 0; j < pat_table->pid_table_len; j++) {
                        pid_table = &pat_table->pid_table[j];
-                       if (service_table->service_id == pid_table->program_number)
+                       if (service_table->service_id == pid_table->service_id)
                                break;
                }
                if (j == pat_table->pid_table_len) {
index 9311162..e62bbeb 100644 (file)
@@ -43,7 +43,7 @@ static void parse_pat(struct dvb_descriptors *dvb_desc,
                memset(&dvb_desc->pat_table.pid_table[n], 0,
                       sizeof(dvb_desc->pat_table.pid_table[n]));
 
-               dvb_desc->pat_table.pid_table[n].program_number = service_id;
+               dvb_desc->pat_table.pid_table[n].service_id = service_id;
                dvb_desc->pat_table.pid_table[n].pid = pmt_pid;
 
                if (dvb_desc->verbose)
@@ -410,7 +410,7 @@ struct dvb_descriptors *get_dvb_ts_tables(char *dmxdev, int verbose)
        /* PMT tables */
        for (i = 0; i < dvb_desc->pat_table.pid_table_len; i++) {
                struct pid_table *pid_table = &dvb_desc->pat_table.pid_table[i];
-               uint16_t pn = pid_table->program_number;
+               uint16_t pn = pid_table->service_id;
                /* Skip PAT, CAT, reserved and NULL packets */
                if (pn < 0x0010 || pn == 0x1fff)
                        continue;
index 409c6f7..4323458 100644 (file)
@@ -9,7 +9,7 @@ struct pmt_table {
 };
 
 struct pid_table {
-       uint16_t program_number;
+       uint16_t service_id;
        uint16_t pid;
        struct pmt_table pmt_table;
        unsigned video_pid_len, audio_pid_len;