Skip to content

Commit

Permalink
update libwebm to libwebm-1.0.0.29-9-g1930e3c
Browse files Browse the repository at this point in the history
changelog:
https://chromium.googlesource.com/webm/libwebm/+log/ee0bab576..1930e3ca2

Bug: webm:1792
Change-Id: I5c5c30c767d357528f102ff38957655e2ec0c645
  • Loading branch information
jzern committed Mar 24, 2023
1 parent 8125079 commit cda56fa
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
1 change: 1 addition & 0 deletions third_party/libwebm/AUTHORS.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
# Name or Organization <email address>

Google Inc.
Elijah Cirioli <[email protected]>
3 changes: 3 additions & 0 deletions third_party/libwebm/Android.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Ignore this file during non-NDK builds.
ifdef NDK_ROOT
LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)
Expand All @@ -18,3 +20,4 @@ LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD
LOCAL_LICENSE_CONDITIONS := notice
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE.TXT $(LOCAL_PATH)/PATENTS.TXT
include $(BUILD_STATIC_LIBRARY)
endif # NDK_ROOT
5 changes: 3 additions & 2 deletions third_party/libwebm/README.libvpx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
URL: https://chromium.googlesource.com/webm/libwebm
Version: ee0bab576c338c9807249b99588e352b7268cb62
Version: 1930e3ca23b007f3ff11d98a570077be6201957e
License: BSD
License File: LICENSE.txt
License File: LICENSE.TXT

Description:
libwebm is used to handle WebM container I/O.
Expand All @@ -18,3 +18,4 @@ Only keep:
- mkvmuxer/
- mkvparser/
- PATENTS.TXT
- use -std=gnu++11 in Android.mk (https://crbug.com/webm/1708)
4 changes: 2 additions & 2 deletions third_party/libwebm/mkvmuxer/mkvmuxer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -607,10 +607,10 @@ bool ContentEncoding::Write(IMkvWriter* writer) const {
return true;
}

uint64_t ContentEncoding::EncodingSize(uint64_t compresion_size,
uint64_t ContentEncoding::EncodingSize(uint64_t compression_size,
uint64_t encryption_size) const {
// TODO(fgalligan): Add support for compression settings.
if (compresion_size != 0)
if (compression_size != 0)
return 0;

uint64_t encoding_size = 0;
Expand Down
8 changes: 4 additions & 4 deletions third_party/libwebm/mkvmuxer/mkvmuxer.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ class ContentEncoding {

private:
// Returns the size in bytes for the encoding elements.
uint64_t EncodingSize(uint64_t compresion_size,
uint64_t EncodingSize(uint64_t compression_size,
uint64_t encryption_size) const;

// Returns the size in bytes for the encryption elements.
Expand Down Expand Up @@ -1425,7 +1425,7 @@ class SeekHead {
bool Write(IMkvWriter* writer);

// We are going to put a cap on the number of Seek Entries.
const static int32_t kSeekEntryCount = 5;
constexpr static int32_t kSeekEntryCount = 5;

private:
// Returns the maximum size in bytes of one seek entry.
Expand Down Expand Up @@ -1505,8 +1505,8 @@ class Segment {
kBeforeClusters = 0x1 // Position Cues before Clusters
};

static const uint32_t kDefaultDocTypeVersion = 4;
static const uint64_t kDefaultMaxClusterDuration = 30000000000ULL;
static constexpr uint32_t kDefaultDocTypeVersion = 4;
static constexpr uint64_t kDefaultMaxClusterDuration = 30000000000ULL;

Segment();
~Segment();
Expand Down
2 changes: 1 addition & 1 deletion third_party/libwebm/mkvmuxer/mkvmuxerutil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ uint64 WriteVoidElement(IMkvWriter* writer, uint64 size) {
void GetVersion(int32* major, int32* minor, int32* build, int32* revision) {
*major = 0;
*minor = 3;
*build = 0;
*build = 1;
*revision = 0;
}

Expand Down
6 changes: 3 additions & 3 deletions third_party/libwebm/mkvparser/mkvparser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Type* SafeArrayAlloc(unsigned long long num_elements,
void GetVersion(int& major, int& minor, int& build, int& revision) {
major = 1;
minor = 1;
build = 0;
build = 1;
revision = 0;
}

Expand Down Expand Up @@ -298,7 +298,7 @@ long UnserializeInt(IMkvReader* pReader, long long pos, long long size,
if (status < 0)
return status;

unsigned long long result = first_byte;
unsigned long long result = static_cast<unsigned long long>(first_byte);
++pos;

for (long i = 1; i < size; ++i) {
Expand Down Expand Up @@ -2432,7 +2432,7 @@ bool CuePoint::TrackPosition::Parse(IMkvReader* pReader, long long start_,
pos += size; // consume payload
}

if ((m_pos < 0) || (m_track <= 0)) {
if ((m_pos < 0) || (m_track <= 0) || (m_block < 0) || (m_block > LONG_MAX)) {
return false;
}

Expand Down

0 comments on commit cda56fa

Please sign in to comment.