Fix mandatory elements before writing a master to the file.

Otherwise libebml might assert() because some mandatory elements are
missing. This mostly happens with files not created by libebml itself,
e.g. those by HandBrake.

Fix for bug 445.
This commit is contained in:
Moritz Bunkus 2009-12-04 11:05:42 +01:00
parent 416f25ba0a
commit ccd548a4ec

View File

@ -302,6 +302,8 @@ kax_analyzer_c::read_element(kax_analyzer_data_c *element_data) {
kax_analyzer_c::update_element_result_e
kax_analyzer_c::update_element(EbmlElement *e,
bool write_defaults) {
fix_mandatory_elements(e);
try {
call_and_validate({}, "update_element_0");
call_and_validate(overwrite_all_instances(e->Generic().GlobalId), "update_element_1");