mkvinfo: report size of elements with unknown size correctly

Part of the fix of #2530.
This commit is contained in:
Moritz Bunkus 2019-04-10 20:46:31 +02:00
parent 4db66e2574
commit a2e7d242c8
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85
2 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,8 @@
its validity right before starting to mux/adding to the job queue. Before it
tried to force that into something valid, often resulting in unintentional
paths (such as "C:\users\…\DC\files\…"). Fixes #2527.
* mkvinfo: when using the `--size` option, mkvinfo will now report the
correctly if an element has an unknown size. Part of the fix of #2530.
# Version 32.0.0 "Astral Progressions" 2019-03-12

View File

@ -296,7 +296,7 @@ kax_info_c::create_text_representation(EbmlElement &e) {
text += ": "s + value;
}
return create_element_text(text, e.GetElementPosition(), e.HeadSize() + e.GetSize(), e.GetSize());
return create_element_text(text, e.GetElementPosition(), e.IsFiniteSize() ? e.HeadSize() + e.GetSize() : -2, e.IsFiniteSize() ? boost::optional<int64_t>{e.GetSize()} : boost::optional<int64_t>{});
}
std::string