Em Fri, 5 May 2017 01:14:29 +0200 Reinhard Speyerer <rspmn@xxxxxxxx> escreveu: > Hi Gregor and Mauro, > > For some reason several/most(?) programs from freenet.TV (connect) which > are distributed via the Internet instead of DVB-T2 have duplicate entries. Found the issue. There's a logic inside the scan algorithm that groups multi-section tables. There was a mistake there with was causing it to read twice the first section. As, on most cases, the SDT table has just one section, nobody noticed it so far. Just added a patch, on both master and stable fixing this issue, as enclosed. Thanks for reporting it! Regards, Mauro - [PATCH] dvb-scan: fix the logic for multi-section handling The logic that parses multisection handling is broken. Right now, it parses twice the initial section, causing duplicated entries at the tables. The net result is that, on tables like SDT, channels appear duplicated. Before this patch, what was happening was: dvb_read_sections: waiting for table ID 0x42, program ID 0x11 dvb_parse_section: received table 0x42, extension ID 0x4072, section 0/1 dvb_parse_section: received table 0x42, extension ID 0x4072, section 1/1 dvb_parse_section: received table 0x42, extension ID 0x4072, section 0/1 dvb_parse_section: table 0x42, extension ID 0x4072: done So, section 0/1 were parsed twice. After that, it now properly detects that section 0/1 was already parsed: dvb_read_sections: waiting for table ID 0x42, program ID 0x11 dvb_parse_section: received table 0x42, extension ID 0x4072, section 0/1 dvb_parse_section: received table 0x42, extension ID 0x4072, section 1/1 dvb_parse_section: table 0x42, extension ID 0x4072: done Reported-by: Reinhard Speyerer <rspmn@xxxxxxxx> Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxx> diff --git a/lib/libdvbv5/dvb-scan.c b/lib/libdvbv5/dvb-scan.c index 07fe13e808a8..7ff8ba4f0446 100644 --- a/lib/libdvbv5/dvb-scan.c +++ b/lib/libdvbv5/dvb-scan.c @@ -239,12 +239,6 @@ static int dvb_parse_section(struct dvb_v5_fe_parms_priv *parms, return -1; } ext += i; - - memset(ext, 0, sizeof(*ext)); - ext->ext_id = h.id; - ext->first_section = h.section_id; - ext->last_section = h.last_section; - new = 1; } }