From patchwork Wed Jan 2 16:03:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Roth?= X-Patchwork-Id: 10746525 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A9B7F91E for ; Wed, 2 Jan 2019 16:04:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 995E528464 for ; Wed, 2 Jan 2019 16:04:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8AD572835B; Wed, 2 Jan 2019 16:04:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F8CB2835B for ; Wed, 2 Jan 2019 16:04:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729511AbfABQED (ORCPT ); Wed, 2 Jan 2019 11:04:03 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:37466 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729435AbfABQED (ORCPT ); Wed, 2 Jan 2019 11:04:03 -0500 Received: by mail-ed1-f67.google.com with SMTP id h15so26589669edb.4 for ; Wed, 02 Jan 2019 08:04:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=m2c8fwL0G+Me11MPhmHD37DGIgl96Fg4lfTF6SWegGI=; b=GTyZiTrShFrWuC13hjSpPhg4PRei3hF1UdwLdXXUXnrOYqifFzfooLyjJpk9wDwl8G XAxhJ8COjsG2pbM0YT6MoFcw+KtCKs6A6kJLoaO1+49kIyzpgWpNTMkdntDXGncLlu65 VC/2mffUa7yYm8t1rANtK5Ja/SOiXsRSFDdfVejdJR/EOw9T84dOoOijgNN2xC+Zm7aq vEBycAotQp0lsUy2pPHSWFLOVCNiCqvO1GNvQ5jLD3K3kro0mfPq3b/6y/sgvchtH2en t2XSqgd4DWkaoyo/Y3QlgnqY+7hxTx1mzegsU+mpAp+R+3aNtYTbZelrbgWGgQPzN9be hGtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=m2c8fwL0G+Me11MPhmHD37DGIgl96Fg4lfTF6SWegGI=; b=lMlMs7eDr1coKLf0kfw1FtyE6mVTH02CNM8FDRmirLo+PtNFR7OFo/lSE2Le2pyn+5 DjeW2UmcRG7GIE6ySGAe9v1A5t4eCRn5a4G/25Yo7mk+HsYHAOy10UaYQfpPQXjKlU1O gDcGSBIYi5kLHCPl1lETb7dqo641uIdVVW6g6cE5/f5pLXiZyYaSnte3SjPKa2ESWvlq No4Kf58mx6HThcplM8DuUrlDL+epkpt51aZliOE0f0O4+2i3iDni4wTYh1sTQtR2P272 B/iJvU5A/JeQ64S/JW0jfpl8hMXIPe+o75Z9O7dnaSeh5ZyTlXNWgV0LgPcMT30lSm+6 8IOQ== X-Gm-Message-State: AJcUuke1hdHN0wBkNaQPvJyfABD3hBjJUmJirkA8rcl96VHtSbNCK5N+ oPkI3h/+3KGdzvz67aPtUxEyeo1s X-Google-Smtp-Source: ALg8bN6Jtet6Bz6oTRkv8QwZYOAPYvZi44Ic7kqT5ziScFiE4+sj17kpNBf6d/wXIp2Y+4OUjIek+Q== X-Received: by 2002:a17:906:3da2:: with SMTP id y2-v6mr1895432ejh.160.1546445040290; Wed, 02 Jan 2019 08:04:00 -0800 (PST) Received: from localhost.localdomain (195.145.107.92.dynamic.wline.res.cust.swisscom.ch. [92.107.145.195]) by smtp.gmail.com with ESMTPSA id l18sm21291593edq.87.2019.01.02.08.03.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Jan 2019 08:03:59 -0800 (PST) From: =?utf-8?q?Andr=C3=A9_Roth?= To: linux-media@vger.kernel.org Cc: abassetta@tiscali.it, =?utf-8?q?Andr=C3=A9_Roth?= Subject: [PATCH 1/3] libdvbv5: do not adjust DVB time daylight saving Date: Wed, 2 Jan 2019 17:03:12 +0100 Message-Id: <20190102160314.7451-1-neolynx@gmail.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Sets tm_isdst to -1. This makes dvb_time available outside of EIT parsing, and struct tm to reflect the actual values received from DVB. Also fixes indentation. Signed-off-by: André Roth --- lib/libdvbv5/tables/eit.c | 49 +++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/lib/libdvbv5/tables/eit.c b/lib/libdvbv5/tables/eit.c index a6ba566a..40db637a 100644 --- a/lib/libdvbv5/tables/eit.c +++ b/lib/libdvbv5/tables/eit.c @@ -156,33 +156,32 @@ void dvb_table_eit_print(struct dvb_v5_fe_parms *parms, struct dvb_table_eit *ei void dvb_time(const uint8_t data[5], struct tm *tm) { - /* ETSI EN 300 468 V1.4.1 */ - int year, month, day, hour, min, sec; - int k = 0; - uint16_t mjd; - - mjd = *(uint16_t *) data; - hour = dvb_bcd(data[2]); - min = dvb_bcd(data[3]); - sec = dvb_bcd(data[4]); - year = ((mjd - 15078.2) / 365.25); - month = ((mjd - 14956.1 - (int) (year * 365.25)) / 30.6001); - day = mjd - 14956 - (int) (year * 365.25) - (int) (month * 30.6001); - if (month == 14 || month == 15) k = 1; - year += k; - month = month - 1 - k * 12; - - tm->tm_sec = sec; - tm->tm_min = min; - tm->tm_hour = hour; - tm->tm_mday = day; - tm->tm_mon = month - 1; - tm->tm_year = year; - tm->tm_isdst = 1; /* dst in effect, do not adjust */ - mktime( tm ); + /* ETSI EN 300 468 V1.4.1 */ + int year, month, day, hour, min, sec; + int k = 0; + uint16_t mjd; + + mjd = *(uint16_t *) data; + hour = dvb_bcd(data[2]); + min = dvb_bcd(data[3]); + sec = dvb_bcd(data[4]); + year = ((mjd - 15078.2) / 365.25); + month = ((mjd - 14956.1 - (int) (year * 365.25)) / 30.6001); + day = mjd - 14956 - (int) (year * 365.25) - (int) (month * 30.6001); + if (month == 14 || month == 15) k = 1; + year += k; + month = month - 1 - k * 12; + + tm->tm_sec = sec; + tm->tm_min = min; + tm->tm_hour = hour; + tm->tm_mday = day; + tm->tm_mon = month - 1; + tm->tm_year = year; + tm->tm_isdst = -1; /* do not adjust */ + mktime( tm ); } - const char *dvb_eit_running_status_name[8] = { [0] = "Undefined", [1] = "Not running", From patchwork Wed Jan 2 16:03:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Roth?= X-Patchwork-Id: 10746527 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 616776C2 for ; Wed, 2 Jan 2019 16:04:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 525472835B for ; Wed, 2 Jan 2019 16:04:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4667F28485; Wed, 2 Jan 2019 16:04:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F16422835B for ; Wed, 2 Jan 2019 16:04:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730354AbfABQEK (ORCPT ); Wed, 2 Jan 2019 11:04:10 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:42853 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729435AbfABQEK (ORCPT ); Wed, 2 Jan 2019 11:04:10 -0500 Received: by mail-ed1-f68.google.com with SMTP id y20so26556284edw.9 for ; Wed, 02 Jan 2019 08:04:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nlScZb1Kr12SXjk8ffD51mk9WQmM6MiWVvQFDfBJLuI=; b=U83POzEZsEdcc8FZE8QpWRBhbSUfC/EgS7wSJ7u1cATfbZAeaa6540mjQ412Aw+MSa lbzvCOiZe+n2fTwGFevpRgM82FlB3jSxi4c1afvz9cBXKr5kcKf0CPMvapkKZx6ZZKEt LNru5UFesceiC7lEAgw/9v5ve1n5m9H7np0AbV6h8JlrphEUVtIj8YFO+kLzT++EMmZQ GvqwOvON90iSIeEpS/c8Rl2qp7bWVEQZIhaDQfdl0u5pGVznFXZ9ed5OnaR8PTkhAHm+ Y7VZCPlgHXJ2pQhdGlurLMhULfr602BO2QeTq0C4VZuakzarGGQUcqcCYLCdvrqShjAo O7pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nlScZb1Kr12SXjk8ffD51mk9WQmM6MiWVvQFDfBJLuI=; b=pn/aPbWYyaSqNp5GrHKcfNZoX8djtelJXnwrqheRpMFy+CKUfHWGNNgyGI71tJvsvr YwhGyp4NIWfhk1s2GSEd0LyYzr9F+2jalNQ6XLMhCVqMRmjA/zgO+R4iP5jNBg0dyRkh BNFxgRc9gcg+pT9p3H29w2Rkpb01mz90cBjIz0wNaqExBoY2FPMkoaR17jnKYNkJw3bv CZvENBZvZi4swEdXQVvrdWj+G3QeJnpSMNFn/31/H4WCDqh7KMtYVUiHp8T4ycxR9SUu Y1EVBvGJ9uVTiRYYJRUlVu50cZCNeYrFB/R7791Um6yi1XdPaC5ii2G1sX4YuWzoDcM9 tlkQ== X-Gm-Message-State: AA+aEWYZ1V22gzJohOq7IlAAhnd0KK+42EguBBqhB1n1GUlJZHCmtRoz xwrcy/ejemfcjtQrzWQehHJ9mTsb X-Google-Smtp-Source: AFSGD/XjpoTFZPSJdM6rnqLErrUmTVQ3PRvE6J74Rm4GGKC7cOytSibRM/8lD8cPMcgXk2RsOER7Pg== X-Received: by 2002:a50:ab82:: with SMTP id u2mr40216725edc.111.1546445048223; Wed, 02 Jan 2019 08:04:08 -0800 (PST) Received: from localhost.localdomain (195.145.107.92.dynamic.wline.res.cust.swisscom.ch. [92.107.145.195]) by smtp.gmail.com with ESMTPSA id l18sm21291593edq.87.2019.01.02.08.04.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Jan 2019 08:04:07 -0800 (PST) From: =?utf-8?q?Andr=C3=A9_Roth?= To: linux-media@vger.kernel.org Cc: abassetta@tiscali.it, =?utf-8?q?Andr=C3=A9_Roth?= Subject: [PATCH 2/3] libdvbv5: enable newlines in dvb strings Date: Wed, 2 Jan 2019 17:03:13 +0100 Message-Id: <20190102160314.7451-2-neolynx@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190102160314.7451-1-neolynx@gmail.com> References: <20190102160314.7451-1-neolynx@gmail.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Newlines in are encoded as 0x8a, convert them to '\n' Signed-off-by: André Roth --- lib/libdvbv5/parse_string.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/libdvbv5/parse_string.c b/lib/libdvbv5/parse_string.c index 6e301ac8..d354f497 100644 --- a/lib/libdvbv5/parse_string.c +++ b/lib/libdvbv5/parse_string.c @@ -461,11 +461,13 @@ void dvb_parse_string(struct dvb_v5_fe_parms *parms, char **dest, char **emph, emphasis = 1; else if (*s == 0x87 && emphasis) emphasis = 0; - else if (*s >= 0x20 && (*s < 0x80 || *s > 0x9f)) { + else if (*s >= 0x20 && (*s < 0x80 || *s > 0x9f)) { *p++ = *s; if (emphasis) *p2++ = *s; } + else if (*s == 0x8a) + *p++ = '\n'; } *p = '\0'; *p2 = '\0'; @@ -495,6 +497,8 @@ void dvb_parse_string(struct dvb_v5_fe_parms *parms, char **dest, char **emph, emphasis = 1; else if (code == 0xe087 && emphasis) emphasis = 0; + else if (code == 0xe08a) + /* newline, append code blow */ ; else if (code >= 0xe080 && code <= 0xe09f) continue; From patchwork Wed Jan 2 16:03:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Roth?= X-Patchwork-Id: 10746529 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 79AA991E for ; Wed, 2 Jan 2019 16:04:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A3E22835B for ; Wed, 2 Jan 2019 16:04:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E69628485; Wed, 2 Jan 2019 16:04:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 89C852835B for ; Wed, 2 Jan 2019 16:04:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730104AbfABQEM (ORCPT ); Wed, 2 Jan 2019 11:04:12 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:38763 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729748AbfABQEL (ORCPT ); Wed, 2 Jan 2019 11:04:11 -0500 Received: by mail-ed1-f65.google.com with SMTP id h50so26605760ede.5 for ; Wed, 02 Jan 2019 08:04:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pPjeukSh+TRKXoj/0X/oUWs3R6ZLikejzxWh67ky9XQ=; b=fv35KvApSc/NMdrvdKawa+O98zI6cqZwi3cMlWIcFpzD91LWJfExbE90jnTp/Iqqqs LaG9jO2uvdIHW9uoinpNt+icVvtrDFwPCNt+dd6/tTyL7A5OwIlvgSyAy09ADpax4FkK NaQb/Gd5L7Ivon19BqFkPAEzxKPnWmDQe5mNbTGKTyArAY7MgGFPHuAAbdIDsLNTUnIg ZwNsmMbSkhEoEvkCInIzHDLPKI/W4AEJtI3gkHhq8PFqSNqNVQySS5Vht5VEmv6A1yWn ywve5688SCw6mJWu0j7WWlaycBUVrPgCs9FYpWrtS4Eyby8fgJfiONHkpzb38P6p2SI3 gQoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pPjeukSh+TRKXoj/0X/oUWs3R6ZLikejzxWh67ky9XQ=; b=ovjWswaUdDCnce49A2B3Ymw7p5dWE/gf7V75weiEvYKuLF8vR1RMiNo+OyEperFAXC wlqusKpE64qBJf+f0Sjz0jT4qb8OtBQ1AR9g0nAeXGHNfG0H8jjelPi/emorvINr+TZT EGEAgkgC6uzmwbhaNP+OhVU9sVNKOTRfj053ZfAfHOtXn28JizkJACLHS26K70M6TnxO SA4DU5UyTLxArtnYcKCSXEFlnbvlyOLVPohWSwicLJ5LAuvEnAWZyZCCgnZsFGMuD66a WGSVIgqxcbL+NapaZPQn15H28vAvwNilaAjmsBT/MJ+CoAPSrz0DtSN1e1y/SP35ZxJ3 MaQg== X-Gm-Message-State: AJcUukdtz3LLvoeYJkD/Ew5rcKsOWtZlH2k6oSzhREyp13S1pdsETXB5 YcsdN1ChuWcO10JZBwnmBdwBZFZL X-Google-Smtp-Source: ALg8bN6E89V8tYGW1i//xr9P2C3gpWF7iNZV4UmqQvlEXjo/86Y0k8irqorrnxwJzUbTBitxoc+adA== X-Received: by 2002:a17:906:1189:: with SMTP id n9-v6mr3239306eja.2.1546445049413; Wed, 02 Jan 2019 08:04:09 -0800 (PST) Received: from localhost.localdomain (195.145.107.92.dynamic.wline.res.cust.swisscom.ch. [92.107.145.195]) by smtp.gmail.com with ESMTPSA id l18sm21291593edq.87.2019.01.02.08.04.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Jan 2019 08:04:08 -0800 (PST) From: =?utf-8?q?Andr=C3=A9_Roth?= To: linux-media@vger.kernel.org Cc: abassetta@tiscali.it, =?utf-8?q?Andr=C3=A9_Roth?= Subject: [PATCH 3/3] libdvbv5: fix array size in desc_logical_channel Date: Wed, 2 Jan 2019 17:03:14 +0100 Message-Id: <20190102160314.7451-3-neolynx@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190102160314.7451-1-neolynx@gmail.com> References: <20190102160314.7451-1-neolynx@gmail.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This fixes the descriptor paring on 64bit systems. Thanks to abassetta@tiscali.it for finding and patching. Signed-off-by: André Roth --- lib/libdvbv5/descriptors/desc_logical_channel.c | 4 ++-- lib/libdvbv5/dvb-file.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libdvbv5/descriptors/desc_logical_channel.c b/lib/libdvbv5/descriptors/desc_logical_channel.c index 7ae4d59a..1a8dc658 100644 --- a/lib/libdvbv5/descriptors/desc_logical_channel.c +++ b/lib/libdvbv5/descriptors/desc_logical_channel.c @@ -40,7 +40,7 @@ int dvb_desc_logical_channel_init(struct dvb_v5_fe_parms *parms, memcpy(d->lcn, p, d->length); - len = d->length / sizeof(d->lcn); + len = d->length / 4; for (i = 0; i < len; i++) { bswap16(d->lcn[i].service_id); @@ -55,7 +55,7 @@ void dvb_desc_logical_channel_print(struct dvb_v5_fe_parms *parms, const struct int i; size_t len; - len = d->length / sizeof(d->lcn); + len = d->length / 4; for (i = 0; i < len; i++) { dvb_loginfo("| service ID[%d] %d", i, d->lcn[i].service_id); diff --git a/lib/libdvbv5/dvb-file.c b/lib/libdvbv5/dvb-file.c index ffdfe292..d077271a 100644 --- a/lib/libdvbv5/dvb-file.c +++ b/lib/libdvbv5/dvb-file.c @@ -987,7 +987,7 @@ static char *dvb_vchannel(struct dvb_v5_fe_parms_priv *parms, size_t len; int r; - len = d->length / sizeof(d->lcn); + len = d->length / 4; for (i = 0; i < len; i++) { if (service_id == d->lcn[i].service_id) { r = asprintf(&buf, "%d.%d",