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 28, 2024
1 parent d369800 commit efd91a8
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 @@ -454,11 +454,12 @@ class EBML_DLL_API EbmlElement {
static bool WriteSkipDefault(const EbmlElement &elt) {
if (elt.IsDefaultValue())
return false;
return true;
return !elt.ElementSpec().GetVersions().IsAlwaysDeprecated();
}

static bool WriteAll(const EbmlElement &) {
return true;
// write all elements except deprecated ones
static bool WriteAll(const EbmlElement & elt) {
return !elt.ElementSpec().GetVersions().IsAlwaysDeprecated();
}

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

0 comments on commit efd91a8

Please sign in to comment.