aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-02-23 12:59:14 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-02-23 13:38:08 +0100
commitec3ae7dbb087e12b0095d00a9074c8be2d017595 (patch)
treef3e02f491756598b25affea8a348005e58bbe97d
parentbe113b1c82e446493aff174f4b9c23617edc74d4 (diff)
downloadv4l-utils-ec3ae7dbb087e12b0095d00a9074c8be2d017595.tar.gz
libdvbv5: add a warning if a descriptor's init doesn't went fine
Instead of relying that all descriptors will report the error conditions, add a generic handler, as it may help to discover hidden problems. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r--lib/libdvbv5/descriptors.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libdvbv5/descriptors.c b/lib/libdvbv5/descriptors.c
index 5a580f95..9ba1a341 100644
--- a/lib/libdvbv5/descriptors.c
+++ b/lib/libdvbv5/descriptors.c
@@ -193,6 +193,11 @@ int dvb_desc_parse(struct dvb_v5_fe_parms *parms, const uint8_t *buf,
}
dvb_desc_init(desc_type, desc_len, current); /* initialize the standard header */
if (init(parms, ptr, current) != 0) {
+ dvb_logwarn("Couldn't handle descriptor type 0x%02x (%s?), size %d",
+ desc_type, dvb_descriptors[desc_type].name, desc_len);
+ if (parms->verbose)
+ dvb_hexdump(parms, "content: ", ptr, desc_len);
+
free(current);
return -4;
}