Hi, the scan utility has a little bug. If a sdt is found, the informations for a channel is created. If no nit was found up to this point, the informations of a transponder does only contains the information from the initial scan file. The entry of the the transport stream id (tid) isn't initialized yet. The tid is always 0 for such channels. For my local setup (DVB-C with the German provider 'Kabel BW'), this occurs always for the first transponder. The attached patch will fix this problem (only) for the generated channel files. The fix stores a pointer of the transponder within the channel info instead of the tid from the transponder. At the time where the output file is generated, a valid nit parsing may update all transponders. In this case, the tid is valid. A better solution may be: start the sdt parsing only, if a valid nit was found. Signed off by: Hartmut Birr <e9hack@xxxxxxxxxxxxxx> - Hartmut
diff -r aeddd2c75f4a util/scan/scan.c --- a/util/scan/scan.c Mon Apr 16 18:02:52 2007 +0200 +++ b/util/scan/scan.c Sat Nov 18 14:15:35 2006 +0200 @@ -102,9 +102,28 @@ enum running_mode { #define AUDIO_CHAN_MAX (32) #define CA_SYSTEM_ID_MAX (16) +struct transponder { + struct list_head list; + struct list_head services; + int network_id; + int original_network_id; + int transport_stream_id; + enum fe_type type; + struct dvb_frontend_parameters param; + enum polarisation polarisation; /* only for DVB-S */ + int orbital_pos; /* only for DVB-S */ + unsigned int we_flag : 1; /* West/East Flag - only for DVB-S */ + unsigned int scan_done : 1; + unsigned int last_tuning_failed : 1; + unsigned int other_frequency_flag : 1; /* DVB-T */ + unsigned int wrong_frequency : 1; /* DVB-T with other_frequency_flag */ + int n_other_f; + uint32_t *other_f; /* DVB-T freqeuency-list descriptor */ +}; + struct service { struct list_head list; - int transport_stream_id; + struct transponder* transponder; int service_id; char *provider_name; char *service_name; @@ -126,26 +145,6 @@ struct service { int channel_num; }; -struct transponder { - struct list_head list; - struct list_head services; - int network_id; - int original_network_id; - int transport_stream_id; - enum fe_type type; - struct dvb_frontend_parameters param; - enum polarisation polarisation; /* only for DVB-S */ - int orbital_pos; /* only for DVB-S */ - unsigned int we_flag : 1; /* West/East Flag - only for DVB-S */ - unsigned int scan_done : 1; - unsigned int last_tuning_failed : 1; - unsigned int other_frequency_flag : 1; /* DVB-T */ - unsigned int wrong_frequency : 1; /* DVB-T with other_frequency_flag */ - int n_other_f; - uint32_t *other_f; /* DVB-T freqeuency-list descriptor */ -}; - - struct section_buf { struct list_head list; const char *dmx_devname; @@ -265,7 +264,7 @@ static struct service *alloc_service(str struct service *s = calloc(1, sizeof(*s)); INIT_LIST_HEAD(&s->list); s->service_id = service_id; - s->transport_stream_id = tp->transport_stream_id; + s->transponder = tp; list_add_tail(&s->list, &tp->services); return s; } @@ -588,7 +587,7 @@ static void parse_service_descriptor (co } info("0x%04x 0x%04x: pmt_pid 0x%04x %s -- %s (%s%s)\n", - s->transport_stream_id, + s->transponder->transport_stream_id, s->service_id, s->pmt_pid, s->provider_name, s->service_name, @@ -818,7 +817,7 @@ static void parse_pmt (const unsigned ch tmp += sprintf(tmp, ", 0x%04x (%.4s)", s->audio_pid[i], s->audio_lang[i]); debug("0x%04x 0x%04x: %s -- %s, pmt_pid 0x%04x, vpid 0x%04x, apid %s\n", - s->transport_stream_id, + s->transponder->transport_stream_id, s->service_id, s->provider_name, s->service_name, s->pmt_pid, s->video_pid, msg_buf); @@ -2008,7 +2007,7 @@ static void dump_lists (void) s->ac3_pid, s->service_id, t->original_network_id, - s->transport_stream_id, + s->transponder->transport_stream_id, t->orbital_pos, t->we_flag, vdr_dump_provider,
_______________________________________________ linux-dvb mailing list linux-dvb@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb