Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't attempt to write deprecated elements #209

Merged
merged 1 commit into from
Jan 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading