Return an error when DocType, DocTypeReadVersion, DocTypeVersion
EBMLMaxIDLength or EBMLMaxSizeLength are invalid or cannot be
handled by mkvparser.
Update samples to respect the return value from EBMLHeader::Parse.
BUG=https://code.google.com/p/webm/issues/detail?id=1057
Change-Id: I9337f13c1d5fa366b1101e48fe6bc46eb5b2ee97
In several cases, the parser would parse a header
(say, a track header, or the segment info header)
in the constructor for the type. The parser had
assumed (incorrectly) that the file was well-formed,
but this turned out to be an incorrect assumption.
The parse errors triggered some assertion failures,
but this is not acceptable in a production system.
The parser solved that problem by separating the
construction of the header object from the parsing
of the file. There is now a separate parse method
to be called after construction of the object,
which returns a status whether the parse was
successful.
This change fixes the bugs from the following
tracker issues:
http://code.google.com/p/webm/issues/detail?id=399http://code.google.com/p/webm/issues/detail?id=400
Change-Id: Idb09154ae7008429d8613ce3b3e8294f5a12de86
Previously, parsing of a Block element was done inside its
constructor. Parsing errors were handled via assertion checks,
but this only works in practice if there are no actual errors
in the file.
We did come across a file, however, that used EMBL-style lacing,
but the lacing was done incorrectly and so the parse asserted.
This isn't acceptable for a production system, and more a graceful
handling of parse errors was needed.
The code was restructured such that the Block object's ctor does
only trivial initialization of member variables. A separate Parse
method was added, that is called after the object is constructed.
If the parse succeeds all is well, otherwise the object is destroyed
and the error is reported to the caller.
This commit fixes bug tracker issue #398, described here:
http://code.google.com/p/webm/issues/detail?id=398
Change-Id: Ib95ca95d0eec08cf670b308c461e42ed8345e890
Makefile:
- Add a new target that makes a single libwebm.a instead of building
separate muxer and parser libraries.
- Update sample targets accordingly.
Visual Studio:
- Use a single project for muxing and parsing, and build a single library
name libwebm.lib.
- Update code generation settings (DLL -> static runtimes).
- Use C7 debug information format (instead of PDB)
- Disable minimal rebuild (C7 use causes warning otherwise).
Change-Id: Ie221d4ee02c93f98f2521757c08b75ecbf75f54f