This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: libdvbv5: fix the count of partial receptions
Author:  Felipe Eduardo Concha Avello <[email protected]>
Date:    Tue Nov 3 23:52:24 2015 -0200

Currently the number of elements are counted wrong, its divided by the size
of a pointer and not the size of the struct
isdb_desc_partial_reception (uint16_t).

I noticed this when using "dvbv5-scan -v" in order to debug an ISDB-T table.

Signed-off-by: Felipe Concha Avello <[email protected]>

 lib/libdvbv5/descriptors/desc_partial_reception.c |    4 ++--
 lib/libdvbv5/dvb-scan.c                           |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=e4d174b13ecfceed2318fcabc14ece7226366dd7

diff --git a/lib/libdvbv5/descriptors/desc_partial_reception.c 
b/lib/libdvbv5/descriptors/desc_partial_reception.c
index ce40882..e1352b2 100644
--- a/lib/libdvbv5/descriptors/desc_partial_reception.c
+++ b/lib/libdvbv5/descriptors/desc_partial_reception.c
@@ -38,7 +38,7 @@ int isdb_desc_partial_reception_init(struct dvb_v5_fe_parms 
*parms,
 
        memcpy(d->partial_reception, p, d->length);
 
-       len = d->length / sizeof(d->partial_reception);
+       len = d->length / sizeof(*d->partial_reception);
 
        for (i = 0; i < len; i++)
                bswap16(d->partial_reception[i].service_id);
@@ -58,7 +58,7 @@ void isdb_desc_partial_reception_print(struct dvb_v5_fe_parms 
*parms, const stru
        int i;
        size_t len;
 
-       len = d->length / sizeof(d->partial_reception);
+       len = d->length / sizeof(*d->partial_reception);
 
        for (i = 0; i < len; i++) {
                dvb_loginfo("|           service ID[%d]     %d", i, 
d->partial_reception[i].service_id);
diff --git a/lib/libdvbv5/dvb-scan.c b/lib/libdvbv5/dvb-scan.c
index 1ffb98a..19da291 100644
--- a/lib/libdvbv5/dvb-scan.c
+++ b/lib/libdvbv5/dvb-scan.c
@@ -905,7 +905,7 @@ static void add_update_nit_1seg(struct dvb_table_nit *nit,
        if (!tr->update)
                return;
 
-       len = d->length / sizeof(d->partial_reception);
+       len = d->length / sizeof(*d->partial_reception);
 
        for (i = 0; i < len; i++) {
                if (tr->entry->service_id == 
d->partial_reception[i].service_id) {

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to