Commit Graph

16 Commits

Author SHA1 Message Date
Michael Bradshaw
af81f26025 Fix MSVC warning about 2147483648 not fitting in an int
This also cleans up some of the documentation. I'm not sure what happened to that last line.

BUG=webm:1501

Change-Id: Ie0ff0607ebb60d033e7ad40bdc7943c0a6bd6783
2018-03-05 09:51:48 -08:00
Michael Bradshaw
2374a6f0a0 Fix compilation with MSVC
BUG=webm:1499

Change-Id: I8e63496a287b6303c287fd2254d4267c79f32f13
2018-02-28 14:32:16 -08:00
Michael Bradshaw
8f638df2c3 Set a maximum limit on element recursion depth
The maximum recursion depth is set to 25. If that's not sufficient for
someone's needs, they're welcome to submit a patch that makes it
configurable.

This fixes a stack overflow found by AutoFuzz. The stack overflow was
caused by recursing too much. I've included the fuzzer's test cases in
the fuzzing/corpus directory. I've also created two (one for SimpleTag
and ChapterAtom each) additional test files, each comprised of 10,000
recursively nested elements. Manually running the fuzzer (with ASan and
UBSan) shows all inputs are now handled correctly, and no stack
overflows occur.

Change-Id: I8514259fd0788e71a58e3ccce2a0fb8a3523acfc
2018-01-22 13:50:14 -08:00
Michael Bradshaw
8f709400a2 webm_parser: Add new enum values
For the new stereo mode, see https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md#webm-matroska
For the new color primaries, see ISO/IEC 23001-8:2016

Change-Id: I92c2bb0fedc2b1895d893ad55095d29c811c0dcf
2017-11-03 11:41:03 -07:00
James Zern
0e179d683e update .clang-format
generated by version 3.8.1
local changes from --style=Google

3a4
> # Generated with clang-format 3.8.1
10c11
< AlignTrailingComments: true
---
> AlignTrailingComments: false
15,16c16,17
< AllowShortIfStatementsOnASingleLine: true
< AllowShortLoopsOnASingleLine: true
---
> AllowShortIfStatementsOnASingleLine: false
> AllowShortLoopsOnASingleLine: false
37c38
< BreakBeforeTernaryOperators: true
---
> BreakBeforeTernaryOperators: false

Change-Id: I4ded7e36fb8bd5407cfba6d1c4f86e0bec620c0c
2016-10-17 15:41:56 -07:00
Michael Bradshaw
17200208c5 webm_parser: Add Mesh value for ProjectionType
Change-Id: I0e2be134cfefdb62edc54288720523646d01479a
2016-09-13 18:16:54 -07:00
Michael Bradshaw
78f2c5ab78 webm_parser: Use ./ prefix for includes
Fixes a lint presubmit check.

Change-Id: If06a7b11c18742dfe659136736082945a4853b3e
2016-09-08 15:42:22 -07:00
Michael Bradshaw
da62f659e4 webm_parser: Remove webm/ prefix from public includes
Using a webm/ prefix requires clients to add the webm_parser/include
path to their header search paths. This is inconvenient and an
unnecessary restriction.

Change-Id: If73a4433ad42f326a544766beca5f05710f52243
2016-09-07 16:57:44 -07:00
Michael Bradshaw
e15e8f2cc7 webm_parser: Update README build instructions
Change-Id: Iade055ff076b107ac1665493dad18e812025c31f
2016-09-01 15:52:18 -07:00
Michael Bradshaw
676a7135d1 Add support for the Projection element
It's a part of the Google Spatial Media V2 spec:
https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md

Change-Id: I52f05e34b19239af09774da2f88eb584a0bfa628
2016-08-29 13:15:07 -07:00
Michael Bradshaw
39137d7385 Remove docs saying binary elements default to 0
They don't have a real default, and certainly not an integer value of 0.

Change-Id: I839291b9960315241068f99a0926fca3ca27ac18
2016-08-25 11:19:52 -07:00
Michael Bradshaw
80685d3865 Do not skip over unknown elements at the root level
OnUnknownElement() should be called to handle them.

Change-Id: Iebd99631f094e95d0c3e75952930962e15826bac
2016-08-24 17:37:03 -07:00
Tom Finegan
d518128266 webm_parser: Enable usage of werror.
Mass warning clean up. Mainly:
- Explicit casts of numeric literals to avoid signed/unsigned compare
  warnings.
- Commenting out of unused function arg names.

Change-Id: I0e70393a5743ae984035d43712c724d4ccd12f9d
2016-08-10 08:56:57 -07:00
Tom Finegan
25d26028c1 webm_parser: Convert style to match the rest of libwebm
Remove webm_parser/clang-format-style.
Run clang-format -style=file -i for each source file.

Change-Id: Ieaf44bd323375cbcfec67014e94b7742d6bda14a
2016-07-27 14:31:28 -07:00
Tom Finegan
f8bb7149f5 cmake: Integrate new parsing API and tests.
Change-Id: I11e32bfffda12fa910c06bf7b8e3a0efbccf6054
2016-07-14 11:11:59 -07:00
Michael Bradshaw
cb8ce0b4b5 Add a new incremental parsing API
Change-Id: I6b921766836d58df0281fb23b2add3f62a478e14
2016-06-15 12:39:58 -07:00