From dfc6deaf9ff73ddf6be6472731c27cb0ab8401fe Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 21 Nov 2015 15:22:52 +0100 Subject: [PATCH] ebml_validator: don't treat unknown-sized segment as a warning --- src/tools/ebml_validator.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tools/ebml_validator.cpp b/src/tools/ebml_validator.cpp index 6806a79f7..8cf9868c6 100644 --- a/src/tools/ebml_validator.cpp +++ b/src/tools/ebml_validator.cpp @@ -288,7 +288,11 @@ parse_content(int level, if (size.is_unknown()) { mxinfo(boost::format(Y("%1% Warning: size is coded as 'unknown' (all bits are set)\n")) % level_string(level)); - g_warnings_found = true; + + // In Matroska segments often have an unknown size – so don't + // warn about it. + if (element_name != "Segment") + g_warnings_found = true; } int64_t content_end_pos = size.is_unknown() ? end_pos : g_in->getFilePointer() + size.value;