aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-09-13 09:12:32 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-09-13 09:15:38 +0200
commit362baf05976937b21d5382efe3944a6b391f6500 (patch)
tree947d9cca114bee62c8dbdb80f266bd10aa28287c
parentfcbd7fae7c2208e01a7f670f8ba2f34d62ea6a4d (diff)
libdvbv5: use an array for the fourcc type
While not too late, change the fourcc type to be an array, and display them as chars when printing. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r--lib/include/libdvbv5/desc_registration_id.h2
-rw-r--r--lib/libdvbv5/descriptors/desc_registration_id.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/include/libdvbv5/desc_registration_id.h b/lib/include/libdvbv5/desc_registration_id.h
index 20905533..5e7aa49c 100644
--- a/lib/include/libdvbv5/desc_registration_id.h
+++ b/lib/include/libdvbv5/desc_registration_id.h
@@ -55,7 +55,7 @@ struct dvb_desc_registration {
uint8_t length;
struct dvb_desc *next;
- uint32_t format_identifier;
+ uint8_t format_identifier[4];
uint8_t *additional_identification_info;
} __attribute__((packed));
diff --git a/lib/libdvbv5/descriptors/desc_registration_id.c b/lib/libdvbv5/descriptors/desc_registration_id.c
index f9b3f843..556a1d28 100644
--- a/lib/libdvbv5/descriptors/desc_registration_id.c
+++ b/lib/libdvbv5/descriptors/desc_registration_id.c
@@ -36,7 +36,6 @@ int dvb_desc_registration_init(struct dvb_v5_fe_parms *parms,
}
memcpy(&d->format_identifier, buf, size);
- bswap32(d->format_identifier);
if (desc->length <= size)
return 0;
@@ -52,7 +51,9 @@ void dvb_desc_registration_print(struct dvb_v5_fe_parms *parms, const struct dvb
const struct dvb_desc_registration *d = (const struct dvb_desc_registration *) desc;
int i = 0;
- dvb_loginfo("| format_identifier : %08x", d->format_identifier);
+ dvb_loginfo("| format_identifier : %c%c%c%c",
+ d->format_identifier[0], d->format_identifier[1],
+ d->format_identifier[2], d->format_identifier[3]);
if (!d->additional_identification_info)
return;

Privacy Policy