From: Mauro Carvalho Chehab Date: Sun, 16 Feb 2014 02:05:36 +0000 (+0900) Subject: dvb-scan: don't handle NIT table by default on ATSC X-Git-Tag: v4l-utils-1.2.0~211 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d91894aa2207ac0863bb4afc4594020280ddfa3b;p=platform%2Fupstream%2Fv4l-utils.git dvb-scan: don't handle NIT table by default on ATSC With ATSC, the NIT table data is not useful at scan, as the only non-automatically-detected parameter is the modulation. Well, the modulation is mandatory anyway. So, the scanning tool don't need the NIT table at all. As NIT table is not always present (it isn't in KR), that makes the scan procedure faster. We could eventually disable it for other delivery systems, but that would require an extra parameter on two functions, and this would break userspace API. So, let's apply this patch instead. Signed-off-by: Mauro Carvalho Chehab --- diff --git a/lib/libdvbv5/dvb-scan.c b/lib/libdvbv5/dvb-scan.c index 69b175a..2cdb413 100644 --- a/lib/libdvbv5/dvb-scan.c +++ b/lib/libdvbv5/dvb-scan.c @@ -407,16 +407,18 @@ struct dvb_v5_descriptors *dvb_get_ts_tables(struct dvb_v5_fe_parms *parms, dvb_scan_handler->num_program = num_pmt; /* NIT table */ - rc = dvb_read_section(parms, dmx_fd, - DVB_TABLE_NIT, DVB_TABLE_NIT_PID, - (uint8_t **)&dvb_scan_handler->nit, - nit_time * timeout_multiply); - if (parms->abort) - return dvb_scan_handler; - if (rc < 0) - dvb_logerr("error while reading the NIT table"); - else if (parms->verbose) - dvb_table_nit_print(parms, dvb_scan_handler->nit); + if (!dvb_scan_handler->vct || other_nit) { + rc = dvb_read_section(parms, dmx_fd, + DVB_TABLE_NIT, DVB_TABLE_NIT_PID, + (uint8_t **)&dvb_scan_handler->nit, + nit_time * timeout_multiply); + if (parms->abort) + return dvb_scan_handler; + if (rc < 0) + dvb_logerr("error while reading the NIT table"); + else if (parms->verbose) + dvb_table_nit_print(parms, dvb_scan_handler->nit); + } /* SDT table */ if (!dvb_scan_handler->vct || other_nit) {