aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2021-09-27 14:41:50 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-09-27 14:41:50 +0200
commitb7049c80880f6fcd1552ce9999b468d627a0a8b6 (patch)
tree3b4a25b3f57c7bebc6c0eedcf05b961890a6ad1a
parent77c289146ec87087cb3fed1df9034ea6d92b269a (diff)
edid-decode: report length for unknown data blocks
An earlier patch dropped reporting the length of an unknown data block. Add this back since that's useful to know. Also include it for DisplayID. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--parse-cta-block.cpp2
-rw-r--r--parse-displayid-block.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/parse-cta-block.cpp b/parse-cta-block.cpp
index cfc8d91..0301036 100644
--- a/parse-cta-block.cpp
+++ b/parse-cta-block.cpp
@@ -2090,7 +2090,7 @@ void edid_state::cta_block(const unsigned char *x, std::vector<unsigned> &found_
else if (tag < 0x778) unknown_name = "Unknown CTA-861 Data Block";
else if (tag < 0x780) unknown_name = "Unknown CTA-861 HDMI-Related Data Block";
else unknown_name = "Unknown CTA-861 Data Block";
- unknown_name += std::string(" (") + (extended ? "extended " : "") + "tag " + utohex(tag & 0xff) + ")";
+ unknown_name += std::string(" (") + (extended ? "extended " : "") + "tag " + utohex(tag & 0xff) + ", length " + std::to_string(length) + ")";
printf(" %s:\n", unknown_name.c_str());
warn("%s.\n", unknown_name.c_str());
break;
diff --git a/parse-displayid-block.cpp b/parse-displayid-block.cpp
index 6a57346..e512394 100644
--- a/parse-displayid-block.cpp
+++ b/parse-displayid-block.cpp
@@ -1711,7 +1711,7 @@ unsigned edid_state::displayid_block(const unsigned version, const unsigned char
// 0x80 RESERVED
case 0x81: data_block = "CTA-861 DisplayID Data Block"; break;
// 0x82 .. 0xff RESERVED
- default: data_block = "Unknown DisplayID Data Block (" + utohex(tag) + ")"; break;
+ default: data_block = "Unknown DisplayID Data Block (" + utohex(tag) + ", length " + std::to_string(length) + ")"; break;
}
if (length < 3) {

Privacy Policy