Commit Graph

29 Commits

Author SHA1 Message Date
Tom Finegan
c32f970f54 Replace auto_ptr usage with unique_ptr.
Change-Id: I4061686fa4739b4e5c32dfaac341dfba393dd254
2016-01-26 13:02:11 -08:00
Tom Finegan
714f3c4e4f mkvparser: validate results in EBMLHeader::Parse.
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
2015-09-05 08:06:45 -07:00
James Zern
d9bdadeff8 sample{,_muxer}: check SegmentInfo::GetInfo() return
prevents a segfault when parsing a corrupt file

BUG=23430793

Change-Id: I909fd456555ed0d5d871e12258b4887f36f90867
2015-08-21 16:58:04 -07:00
James Zern
82b7e5f487 sample: correct mbstowcs() error check
mbstowcs() can return (size_t)-1 if it encounters an invalid string

BUG=23200382

Change-Id: Ibf67145be3989e16cd24c06850c7a5aa581a0ada
2015-08-14 10:57:48 -07:00
James Zern
04d7809375 sample: check allocation return
BUG=23200382

Change-Id: Ic64f76000d181f169af9aed2f7891f6ed3d28681
2015-08-14 10:57:01 -07:00
Francisco Facioni
b6de61a5c0 Adds support for simple tags
Change-Id: I285e4b73df0a7112bbde7ef13eddf8fdccf59178
2015-07-22 17:07:25 -03:00
Leonel Togniolli
d3a44cd549 Fix track transversal when listing Cues on sample
It could skip tracks or crash if track numbers were non-sequential or tracks were missing.

Change-Id: I485bd4c14c73500775f2944b4486f9a5e154a5e8
2015-04-11 00:24:30 +01:00
Vignesh Venkatasubramanian
867f1894da clang-format on sample.cpp
Conformance of sample.cpp to Google C++ style guide.

Change-Id: Icb6bfce6af5df04775a086e080e6fa742c6d68f9
2014-04-14 12:05:21 -07:00
Tom Finegan
a0c85b1e46 mkvparser/sample: Fix incorrect printf format specifiers.
Change-Id: I8b61f429f7bb1da7b3def612f6413895f8cb945d
2014-02-05 18:51:17 -08:00
Tom Finegan
5440f20071 mkvparser: Add basic cues walking to sample.
Change-Id: Ia90e760f04083fa60b44f4d372e118474fc59fee
2014-01-23 15:31:18 -08:00
Tom Finegan
5c14a3f035 mkvparser/mkvreader/sample: CRLF -> LF
Change-Id: Id4a5bea411d104289548b276d0e996352cc816b1
2014-01-23 10:57:06 -08:00
Tom Finegan
71a097fb12 mkvparser sample: clang-formatify
Exception asterisk placement, which was left as before to match the rest of
libwebm.

Change-Id: I3947acc936cca68df72a5bcd8dec17ed40658ba6
2014-01-23 10:52:46 -08:00
Tom Finegan
327e8ab617 Minor clean up: msvc warnings/include order/comment text.
Change-Id: I2b54abcb9f535715d8713930942447c0b0f5f862
2014-01-22 14:03:40 -08:00
Tom Finegan
81c1d8415c mkvparser: Add support for CodecDelay, DiscardPadding, and SeekPreRoll elements.
Change-Id: Ic9e6ebcc2ba533f8cc1ab933d0bf55782ccab932
2014-01-08 17:33:03 -08:00
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