mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-28 13:57:22 +00:00
kax_analyzer_c: allow caller to take care of mandatory elements
Chapters and tags in WebM only allow a subset of elements, among them certain elements that are mandatory in Matroska. So if the caller is already aware of that, it can take care of them properly so that the analyzer doesn't have to anymore.
This commit is contained in:
parent
4ea7659e7d
commit
23b3d6d7a6
@ -412,17 +412,20 @@ kax_analyzer_c::read_element(kax_analyzer_data_c const &element_data) {
|
||||
|
||||
kax_analyzer_c::update_element_result_e
|
||||
kax_analyzer_c::update_element(ebml_element_cptr const &e,
|
||||
bool write_defaults) {
|
||||
return update_element(e.get(), write_defaults);
|
||||
bool write_defaults,
|
||||
bool add_mandatory_elements_if_missing) {
|
||||
return update_element(e.get(), write_defaults, add_mandatory_elements_if_missing);
|
||||
}
|
||||
|
||||
kax_analyzer_c::update_element_result_e
|
||||
kax_analyzer_c::update_element(EbmlElement *e,
|
||||
bool write_defaults) {
|
||||
bool write_defaults,
|
||||
bool add_mandatory_elements_if_missing) {
|
||||
try {
|
||||
reopen_file_for_writing();
|
||||
|
||||
fix_mandatory_elements(e);
|
||||
if (add_mandatory_elements_if_missing)
|
||||
fix_mandatory_elements(e);
|
||||
remove_voids_from_master(e);
|
||||
|
||||
placement_strategy_e strategy = get_placement_strategy_for(e);
|
||||
|
@ -120,8 +120,8 @@ public:
|
||||
kax_analyzer_c(mm_io_c *file);
|
||||
virtual ~kax_analyzer_c();
|
||||
|
||||
virtual update_element_result_e update_element(EbmlElement *e, bool write_defaults = false);
|
||||
virtual update_element_result_e update_element(ebml_element_cptr const &e, bool write_defaults = false);
|
||||
virtual update_element_result_e update_element(EbmlElement *e, bool write_defaults = false, bool add_mandatory_elements_if_missing = true);
|
||||
virtual update_element_result_e update_element(ebml_element_cptr const &e, bool write_defaults = false, bool add_mandatory_elements_if_missing = true);
|
||||
|
||||
virtual update_element_result_e remove_elements(EbmlId const &id);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user