diff --git a/src/common/ebml.h b/src/common/ebml.h index 4ac0d08b0..31e20c1c1 100644 --- a/src/common/ebml.h +++ b/src/common/ebml.h @@ -298,6 +298,18 @@ GetChildValue(EbmlMaster *master) { return GetChild(master).GetValue(); } +template +bool +Is(EbmlElement *e) { + return !e ? false : (EbmlId(*e) == T::ClassInfos.GlobalId); +} + +template +bool +Is(EbmlElement *e) { + return !e ? false : Is(e) || Is(e); +} + EbmlElement *empty_ebml_master(EbmlElement *e); EbmlElement *create_ebml_element(const EbmlCallbacks &callbacks, const EbmlId &id); EbmlMaster *sort_ebml_master(EbmlMaster *e);