Commit Graph

394 Commits

Author SHA1 Message Date
James Zern
623d182613 DoLoadCluster: tolerate empty clusters
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
2014-10-01 12:53:14 -07:00
Lou Quillio
1156da8d29 Update PATENTS to reflect s/VP8/WebM/g
Sync with http://www.webmproject.org/license/additional/

modified:   PATENTS.TXT

Change-Id: I3e1b3a570b26ada0e6e0d344f1783ef0e3cd5fa1
2014-08-11 14:30:54 -07:00
Tom Finegan
0d4cb404ea mkvmuxerutil: Use rand() in MSVC builds.
Instead of rand_s(), which can make things unpleasant for downstream
projects.

Change-Id: Ie172867c28aaa43223dc5fb694eb4a4fd26515d6
2014-07-18 11:37:06 -07:00
Vignesh Venkatasubramanian
e12fff0ebb mkvmuxer: Overload WriteEbmlHeader for backward compatibility
WriteEbmlHeader function was updated on
a321704b4c. It is a public function that
is exposed outside of the library. Overload it with an old signature
to maintain compatibility. The overloaded function writes the
doc_type_version as 2 by default (thereby retaining the old behavior).

Change-Id: If887a1bfa3e81e7e639c986a922aa5155faab2cf
2014-07-09 11:24:09 -07:00
James Zern
a321704b4c mkvmuxer: write correct DocTypeVersion
Change-Id: I9a463394dec5e69ae8a7b5a1378f19d390e441e4
2: default
4: if CodecDelay/SeekPreRoll/DiscardPadding are present
2014-06-24 16:17:29 -07:00
James Zern
574045edd4 mkvmuxer: fix DiscardPadding
DiscardPadding is a signed int.
this change fixes 2 things:
- allows negative values for discard padding
- fixes cases where an unsigned value would be written such that on read
  the sign would be flipped

Change-Id: I9418da7a22c09768e02d5b61da8d01c2bccb5dee
2014-06-18 12:50:25 -07:00
Sergey Ulanov
8be63972fd Include crop elements when calculating size of Video element
Change acf788 added Crop* elements support, but they were not
added when calculating size of Video element.

Change-Id: I64495cc35406a28b86b40d915dbc291f45aa1263
2014-06-06 00:40:50 -07:00
James Zern
8f2d1b3cde mkvparser: fix DiscardPadding extraction
the element length was being read twice; the second attempt would
consume a portion of the discard padding field often failing due to
limitations in GetUIntLength.

Change-Id: Ibbe3f082e2d05460734a0e1f7d23f3c665e3f24b
2014-05-30 14:44:28 -07:00
Vignesh Venkatasubramanian
1c36c24694 mkvmuxer: fix style guide violations
fix a few style guide violations in mkvmuxer.cpp

Change-Id: If800a5d6851f8ba4b904341fd054e1c2091e281e
2014-05-29 08:30:30 -07:00
Vignesh Venkatasubramanian
568504e64e Merge "UUIDs can have their high bit set" 2014-05-23 09:01:20 -07:00
Sergey Ulanov
acf788bedd Add support for CropLeft, CropRight, CropTop and CropBottom elements.
Change-Id: Ic5993a3e04b3eefccc3016fbe6b49d1e4a5fc05d
2014-05-21 19:46:36 -07:00
Vignesh Venkatasubramanian
418188b03e Merge "muxer: codec_id is a mandatory element" 2014-05-18 12:48:29 -07:00
Vignesh Venkatasubramanian
07688c92d7 mkvmuxer: Reject frames if invalid track number is passed.
Reject frames if an invalid track number is passed. Also change sample_muxer
to reject files which have Block elements with invalid track numbers.

Fixes Issue #659: https://code.google.com/p/webm/issues/detail?id=659

Change-Id: Ie6cf39a409b68bb4d2261f308409ee0c36d5dd8e
2014-05-18 12:45:49 -07:00
Vignesh Venkatasubramanian
2a63e473d8 muxer: codec_id is a mandatory element
codec_id element for a Track is mandatory and it does not have a default.
Rejecting the file if that happens.

Change-Id: I4fb0dfcd4c09eeabf22634db7fdf6ca818c93917
2014-05-16 11:42:05 -07:00
Vignesh Venkatasubramanian
d13c017744 UUIDs can have their high bit set
mkvparser::UnserializeUInt() assumes that unsigned values never have
their high bit set. This is too limiting for UUIDs. In addition, the
Chapters::Atom::Parse() method would truncate a "negative" 64-bit UUID
value to 32 bits and return the truncated value as a status code.
This value then might or might not be treated as an error by the caller
depending on whether the truncated value was itself negative.

Change-Id: I15624ac62d0b02691a1405ee6a5f7eb441b3bc48
2014-05-16 11:25:22 -07:00
James Zern
249629d46c make Mkv(Reader|Writer)(FILE*) explicit
Change-Id: I2c6e0df3049903f8ea53babeacffaa87f6c222b0
2014-05-02 11:47:44 -07:00
Vignesh Venkatasubramanian
7f3cda494a mkvparser: fix a bunch of windows warnings
fix a bunch of windows warnings in parser.

Change-Id: Ia9a03879540595306d8fa2b90ceb9b3b5b0d93a6
2014-05-01 13:50:19 -07:00
Vignesh Venkatasubramanian
5c0617852f Merge "clang-format on mkvparser.[ch]pp" 2014-05-01 11:50:03 -07:00
Vignesh Venkatasubramanian
4df111e60a clang-format on mkvparser.[ch]pp
Conformance of mkvparser.[ch]pp to Google C++ style guide.

Change-Id: I459adac3da1496b432b71b3580b4dbd63037df2b
2014-04-29 11:30:00 -07:00
Vignesh Venkatasubramanian
7b2450131c clang-format re-run.
Re-running clang-format to take into account the recent change in it.
(https://gerrit.chromium.org/gerrit/#/c/69926/ )

Change-Id: Ie11afcaaf07a1967f65fd765f1a7c7112c85875a
2014-04-29 11:27:31 -07:00
Vignesh Venkatasubramanian
c6767b94fd Change AlignTrailingComments to false in .clang-format
AlignTrailingComments set to true seems to be causing some unwanted
alignments. Turning it off.

Change-Id: I5fd99db90b00c76cc7891f2cd1c80ec69ae97697
2014-04-29 00:38:14 -07:00
Vignesh Venkatasubramanian
9097a0691b Merge "muxer: Reject file if TrackType is never specified" 2014-04-29 00:18:55 -07:00
Vignesh Venkatasubramanian
eddf9744cb Merge "clang-format on mkvmuxertypes.hpp and webmids.hpp" 2014-04-28 10:40:43 -07:00
Vignesh Venkatasubramanian
def325c010 muxer: Reject file if TrackType is never specified
According to matroska specification, TrackType is a mandatory element without a
default value [1]. But we have been producing invalid matroska files when
TrackType is never specified because we write 0 by default.

This patch will reject writing a track without specifying the TrackType value.
Specifically, this path will be triggered when Segment::AddTrack() is called
but there is no subsequent call to Track::set_type().

[1] http://www.matroska.org/technical/specs/index.html#TrackType

Fixes issue #769: https://code.google.com/p/webm/issues/detail?id=769

Change-Id: I4d75d169fd96c7e1fad278561f0e7a3e1135989c
2014-04-26 03:14:05 -07:00
Vignesh Venkatasubramanian
41f869cb0c Merge "clang-format on webvttparser.(cc|h)" 2014-04-25 22:19:26 -07:00
Vignesh Venkatasubramanian
fd0be37ba4 clang-format on webvttparser.(cc|h)
Conformance of webvttparser.(cc|h) to Google C++ style guide.

Change-Id: I19610c5795c0bd2446c07a6c2abde58c3286b2ea
2014-04-25 22:18:40 -07:00
Vignesh Venkatasubramanian
207d8a193a Merge "clang-format on mkvmuxerutil.[ch]pp" 2014-04-25 22:09:48 -07:00
Vignesh Venkatasubramanian
02429eb11b Merge "clang-format on mkvwriter.[ch]pp" 2014-04-25 22:09:17 -07:00
Vignesh Venkatasubramanian
0cf7b1b7d3 Merge "clang-format on mkvreader.[ch]pp" 2014-04-25 22:09:02 -07:00
Vignesh Venkatasubramanian
2e80fedf8c Merge "clang-format on sample.cpp" 2014-04-25 22:08:38 -07:00
Vignesh Venkatasubramanian
3402e12d1a Merge "clang-format on sample_muxer.cpp" 2014-04-25 22:08:27 -07:00
Vignesh Venkatasubramanian
1a685db45b Merge "clang-format on sample_muxer_metadata.(cc|h)" 2014-04-25 22:07:59 -07:00
Vignesh Venkatasubramanian
6634c7f87a Merge "clang-format on vttreader.cc" 2014-04-25 22:07:46 -07:00
Vignesh Venkatasubramanian
7566004462 Merge "clang-format on vttdemux.cc" 2014-04-25 22:06:42 -07:00
Vignesh Venkatasubramanian
9915b8408e clang-format on mkvreader.[ch]pp
Conformance of mkvreader.[ch]pp to Google C++ style guide.

Change-Id: I9928a1a7daf9afaa30355b17b3eeeb2966626031
2014-04-15 12:05:58 -07:00
Vignesh Venkatasubramanian
743725477c clang-format on mkvmuxertypes.hpp and webmids.hpp
Conformance of mkvmuxertypes.hpp and webmids.hpp to Google C++ style guide.

Change-Id: Ib5e524f75f04ae6f6f5f24600d70b8448d01964c
2014-04-15 11:39:44 -07:00
Vignesh Venkatasubramanian
0d5a98cee5 clang-format on sample_muxer.cpp
Conformance of sample_muxer.cpp to Google C++ style guide.

Change-Id: I8d7ef884fbaac8ebbf12fc3e3215532ced5ac29b
2014-04-15 11:36:43 -07:00
Vignesh Venkatasubramanian
e3485c9b9f clang-format on vttdemux.cc
Conformance of vttdemux.cc to Google C++ style guide.

Change-Id: Id8838ddec286f935c8a3c1b78d9d9027b467165f
2014-04-15 11:31:20 -07:00
Vignesh Venkatasubramanian
46cc823994 clang-format on dumpvtt.cc
Conformance of dumpvtt.cc to Google C++ style guide.

Change-Id: I5fa11e79e95e61c1a1d923ba76ac7ae343c9c8e4
2014-04-14 12:15:04 -07:00
Vignesh Venkatasubramanian
5218bd291c clang-format on vttreader.cc
Conformance of vttreader.cc to Google C++ style guide.

Change-Id: Id5d2baf0977bca9ab938831cf6e6204acd4ed647
2014-04-14 12:11:27 -07:00
Vignesh Venkatasubramanian
1a0130d069 clang-format on sample_muxer_metadata.(cc|h)
Conformance of sample_muxer_metadata.(cc|h) to Google C++ style guide.

Change-Id: I500a8cdbc443981ecae6ac2a7d8de7cab1c72e28
2014-04-14 12:09:20 -07: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
Vignesh Venkatasubramanian
4c7bec5743 clang-format on mkvwriter.[ch]pp
Conformance of mkvwriter.[ch]pp to Google C++ style guide.

Change-Id: I997545b366277b7f1235b9fa7cc30a4969098553
2014-04-14 10:30:33 -07:00
Vignesh Venkatasubramanian
9ead078aaf clang-format on mkvmuxerutil.[ch]pp
Conformance of mkvmuxerutil.[ch]pp to Google C++ style guide.

Change-Id: Ib66b73adb2682cd5560f6f363fc04d75ab3815c6
2014-04-14 10:28:59 -07:00
Vignesh Venkatasubramanian
fb6b6e6444 clang-format on mkvmuxer.[ch]pp
Conformance of mkvmuxer.[ch]pp to Google C++ style guide.

Change-Id: I9bcd14710adbad4f32aa1a6be2ea7e40fb715e91
2014-04-11 11:41:01 -07:00
Vignesh Venkatasubramanian
ce775929a6 Update .clang-format to allow short functions in one line
Update .clang-format so that it allows short functions and constructors in a
single line if it fits.

Change-Id: I60788089fc7a4e2f4c4df6947368ebc0f3fa8c49
2014-04-11 11:24:46 -07:00
Tom Finegan
0a24fe44ae Merge "Add support for DateUTC and DefaultDuration in MKV Muxer." 2014-04-10 16:13:21 -07:00
Vignesh Venkatasubramanian
11d5b66eb4 Merge "Add .clang-format" 2014-04-09 11:55:47 -07:00
Vignesh Venkatasubramanian
a1a3b14538 Add .clang-format
Add .clang-format file so that it can be used to maintain
the same style throughout the library.

Change-Id: I22bd21055f565a886b5a880856810f4b35b22cce
2014-04-09 11:50:54 -07:00
Sergey Ulanov
0fcec38045 Add support for DateUTC and DefaultDuration in MKV Muxer.
BUG=crbug.com/321825

Change-Id: I5ff8c5b9fd4e6be23ef2bc91a7a4ba021db6441f
2014-04-08 21:48:00 -07:00