Signed-off-by: André Roth <[email protected]>
---
 lib/include/descriptors/vct.h  | 10 ++++++----
 lib/libdvbv5/descriptors/vct.c |  3 ++-
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/lib/include/descriptors/vct.h b/lib/include/descriptors/vct.h
index 6272b43..2d269dc 100644
--- a/lib/include/descriptors/vct.h
+++ b/lib/include/descriptors/vct.h
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2013 - Mauro Carvalho Chehab <[email protected]>
+ * Copyright (c) 2013 - Andre Roth <[email protected]>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -35,14 +36,14 @@ struct dvb_table_vct_channel {
        uint16_t        __short_name[7];
 
        union {
-               uint16_t bitfield1;
+               uint32_t bitfield1;
                struct {
                        uint32_t        modulation_mode:8;
                        uint32_t        minor_channel_number:10;
                        uint32_t        major_channel_number:10;
                        uint32_t        reserved1:4;
                } __attribute__((packed));
-       };
+       } __attribute__((packed));
 
        uint32_t        carrier_frequency;
        uint16_t        channel_tsid;
@@ -60,7 +61,8 @@ struct dvb_table_vct_channel {
                        uint16_t        ETM_location:2;
 
                } __attribute__((packed));
-       };
+       } __attribute__((packed));
+
        uint16_t source_id;
        union {
                uint16_t bitfield3;
@@ -68,7 +70,7 @@ struct dvb_table_vct_channel {
                        uint16_t descriptors_length:10;
                        uint16_t reserved3:6;
                } __attribute__((packed));
-       };
+       } __attribute__((packed));
 
        /*
         * Everything after descriptor (including it) won't be bit-mapped
diff --git a/lib/libdvbv5/descriptors/vct.c b/lib/libdvbv5/descriptors/vct.c
index e703c52..c1578ad 100644
--- a/lib/libdvbv5/descriptors/vct.c
+++ b/lib/libdvbv5/descriptors/vct.c
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2013 - Mauro Carvalho Chehab <[email protected]>
+ * Copyright (c) 2013 - Andre Roth <[email protected]>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -74,7 +75,7 @@ void dvb_table_vct_init(struct dvb_v5_fe_parms *parms, const 
uint8_t *buf,
                bswap32(channel->carrier_frequency);
                bswap16(channel->channel_tsid);
                bswap16(channel->program_number);
-               bswap16(channel->bitfield1);
+               bswap32(channel->bitfield1);
                bswap16(channel->bitfield2);
                bswap16(channel->source_id);
                bswap16(channel->bitfield3);
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to