Instead of relying solely on asserts, which compile away to
nothing in downstream projects using libwebm for parsing webm
input streams, actually check for the conditions being asserted,
and return errors when appropriate.
Change-Id: Id8b6352e8dda69782129dcea8f67203fd9c4f572
sample_muxer was using the buffer size instead of the frame payload size
when passing frames to the muxer.
BUG=https://code.google.com/p/webm/issues/detail?id=1032
Change-Id: I25578934e8822553e3482ded80eaf22651be85cc
Re-run clang-format to pick up some missed changes over the past
few CLs. Also update the .clang-format file to break after ternary
operator.
Change-Id: Ia4ba4e58362c2dbe36aeb33894f0411af33ef17d
Fix EBML lacing block parsing when attempting to parse the last frame
on single-frame videos and assertion when frame_count is lower
than actual data in the file.
Change-Id: I223e30be54970ef75126c6c4ee3401cbeb92e02f
Fixed block parsing to account to cases that would
allow frame_size = 0, only to be rejected later on
Block::GetFrame assert(f.len > 0);
Change-Id: Idb93388b37e1963ec6115ac49f15e4951bc2c724
Malformed files woudl cause the parser to assert.
Instead now it stops parsing and skips the segment.
Change-Id: I256b3b72e43f969693ae16547ca98da07d665e21
Changed assertions to "invalid file format" errors files that
had Block Groups without Block IDs or had invalid sizes or
durations
Change-Id: I1383a63bfb76ee46aaa0aff089780383ce65fc31
Per matroska semantics, all metadata blocks should be considered
key frames. Set it to true in AddMetadata functions.
Change-Id: Ibc26845dc6cc72ccbf90ae8d4dcc27c948e8a375
Use Segment::AddGenericFrame to add frames to the output file. The
other AddFrame* functions will soon be deprecated and this will be
the preferred way of adding frames.
Change-Id: I3ed862543a1e0199617dc613a1760ff5f233ce7d
Malformed files would cause the parser to assert.
Instead now it stops parsing and skips the segment.
Change-Id: I07e3baf5c9eb6feb115e155f226d8abc2c37698e
this is unused as the size of dates is fixed:
Date - signed 8 octets integer in nanoseconds with 0 indicating the
precise beginning of the millennium (at 2001-01-01T00:00:00,000000000
UTC)
Change-Id: I7d44c92a6b746e92e4041238b110115b56e38a93
previously IsValidTrackNumber() expected a track_number > 0
this also fixes a warning:
'comparison of unsigned expression < 0 is always false'
Change-Id: I839863986ff776aae59e38ee7e4a1a710081303a
Refactor muxer to remove a lot of duplicate code. This CL strives
to not change the API as much as possible. Although, there is one
minor public API change (constructor of the Cluster class). Other
than that, all the functions should work exactly the same way as
before.
Following up on this CL, we are going to make AddGenericFrame the
preferred way of adding frames to a segment and deprecate (and
eventually remove) all the other specific AddFrame* functions.
Change-Id: Ie410f1a64a981e1545ade53ce476bbe8b3610c4f
Rename variable "frame" to "data" in all the AddFrame* functions.
This is in prepararation for a follow-up CL.
Change-Id: Ifd0d96cfbeca85c12be23d854bc87e085436984d
If a malformed webm file contains invalid information on the Cues
the segment, the parser would assert.
Instead, now it ignores the Cues and skips the segment.
Change-Id: I9270f6a0935ce9e9a3765a5f324ae542c1ade1c7
The existing CMakeLists.txt ends up generating a static library
with name "liblibwebm.a" rather than "libwebm.a". This patch fixes
it.
Change-Id: I4dabac5158530714a38045b8af29e75ade0a939e
- These files facilitate project/makefile generation.
- Remove old Visual Studio projects.
- Rename Makefile to Makefile.unix.
Change-Id: If786edd75d44c462538526c286eccc5cbf15d828
The third parameter of the MoveCuesBeforeClustersHelper recursive function
should always be the size of the cues element without the master element's size
(i.e.) it should be the sum of size of all Cue Points. This way, the changes in
the Length of the master element itself will be computed correctly.
Change-Id: I05ff1606fb74168f80ffed81fd3c0de3f237c579
previously only empty clusters of known size were accepted; with
clusters of unknown size the cluster has been successfully parsed and a
working copy of the file position updated, so parsing can continue.
clusters of this type are discarded as clusters of known size currently
are.
Change-Id: I3ef848768519ab7f1887a11629c50af72249cead