Commit Graph

15 Commits

Author SHA1 Message Date
matthewjheaney
041a5c5811 Parse headers outside of constructor
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=399
http://code.google.com/p/webm/issues/detail?id=400

Change-Id: Idb09154ae7008429d8613ce3b3e8294f5a12de86
2012-03-13 14:40:17 -04:00
matthewjheaney
6fa7c7611c Block parsing is now robust
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
2012-02-28 14:03:21 -05:00
Tom Finegan
6d99850e7c Build muxer and parser into a single library.
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
2011-08-11 17:19:45 -04:00
Hwasoo Lee
b8cb358204 fixed build error in sample
Change-Id: Id6ac66f5e625952918857c3e13e655452c32abc8
2011-01-25 11:31:20 -05:00
Hwasoo Lee
3b0f1b6d2b fixed memory leaks from utf8towcs()
Change-Id: I4d35b67da464c073d86f465801f64b15e69a8de2
2011-01-06 15:23:28 -05:00
Hwasoo Lee
d97f236f81 fixed the issue 234
Change-Id: Ie527263ae2862426e8c58fce13b34da4c792cc01
2010-11-16 14:54:14 -05:00
Hwasoo Lee
5dd6000dc7 updated to handle a laced webm 2010-11-09 09:54:31 -05:00
Hwasoo Lee
30bf3472bf Updated RELEASE.TXT 2010-11-03 13:46:44 -04:00
matthewjheaney
a92619c7d3 mkvparser: Cluster::GetLast should load block entries
Change-Id: Ia8606be6c316591b1dc97bf684361dc9492e64c1
2010-09-03 16:41:28 -04:00
Hwasoo Lee
4243c5dc20 * fixed item 141 and added GetVersion()
Change-Id: I4a54b66f8c781150e41845b0a62e42ad376e53a4
2010-07-19 15:06:51 -04:00
John Koleszar
e23b91f3b9 sample: lookup track by number to print type
The track number doesn't have to be equal to the track type, so look
up the track from the number in the block to get its type.

Fixes issue #108
2010-06-29 16:29:45 -04:00
Hwasoo Lee
8993f17fb9 removed trailing white spaces in code
Change-Id: Ifec57ab7278a6b63fd2465e32ba82c7805c359ab
2010-06-15 17:47:45 -04:00
Hwasoo Lee
0a8911b74c changed headers for license
Change-Id: Ie09fd98548a9c3300a523b40f83d42c3de13e1c3
2010-06-15 17:43:20 -04:00
Hwasoo Lee
5e785450d6 handled no seekhead of clusters
Change-Id: I901381c774772103e9f0324c8618f2e4b783deec
2010-06-11 14:30:34 -04:00
John Koleszar
d537a9471d Initial version 2010-06-02 10:25:33 -04:00