Skip to content

Commit

Permalink
don't try to write elements that are deprecated
Browse files Browse the repository at this point in the history
They should not be readable by anyone.
  • Loading branch information
robUx4 committed Jan 7, 2024
1 parent 4d4ef95 commit 180868f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ebml/EbmlElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -425,11 +425,12 @@ class EBML_DLL_API EbmlElement {
static bool WriteSkipDefault(const EbmlElement &elt) {
if (elt.IsDefaultValue())
return false;
return true;
return elt.ElementSpec().GetVersions().minver == EbmlDocVersion::ANY_VERSION;
}

static bool WriteAll(const EbmlElement &) {
return true;
// write all elements except deprecated ones
static bool WriteAll(const EbmlElement & elt) {
return elt.ElementSpec().GetVersions().minver == EbmlDocVersion::ANY_VERSION;
}

explicit EbmlElement(const EbmlCallbacks &, std::uint64_t aDefaultSize, bool bValueSet = false);
Expand Down

0 comments on commit 180868f

Please sign in to comment.