libwebm: Remove STL dependency from Android build.
Change-Id: Id2f378f2fa8350aae97394bd8b21918cff4d179a
This commit is contained in:
parent
d5cb6c7fa4
commit
64cee42b85
@ -12,7 +12,6 @@
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include <limits>
|
||||
#include <new>
|
||||
|
||||
#include "mkvmuxerutil.hpp"
|
||||
@ -1466,7 +1465,7 @@ bool Cluster::DoWriteBlock(
|
||||
if (rel_timecode < 0)
|
||||
return false;
|
||||
|
||||
if (rel_timecode > std::numeric_limits<int16>::max())
|
||||
if (rel_timecode > kMaxBlockTimecode)
|
||||
return false;
|
||||
|
||||
if (write_block == NULL)
|
||||
@ -2347,7 +2346,7 @@ int Segment::TestFrame(uint64 track_number,
|
||||
|
||||
const int64 delta_timecode = frame_timecode - last_cluster_timecode;
|
||||
|
||||
if (delta_timecode > std::numeric_limits<int16>::max())
|
||||
if (delta_timecode > kMaxBlockTimecode)
|
||||
return 2;
|
||||
|
||||
// We decide to create a new cluster when we have a video keyframe.
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
|
||||
#include <limits>
|
||||
#include <new>
|
||||
|
||||
#include "mkvwriter.hpp"
|
||||
@ -335,7 +334,7 @@ uint64 WriteSimpleBlock(IMkvWriter* writer,
|
||||
// is a signed, 16-bit integer). However, as a simplification we
|
||||
// only permit non-negative cluster-relative timestamps for blocks.
|
||||
|
||||
if (timecode < 0 || timecode > std::numeric_limits<int16>::max())
|
||||
if (timecode < 0 || timecode > kMaxBlockTimecode)
|
||||
return false;
|
||||
|
||||
if (WriteID(writer, kMkvSimpleBlock))
|
||||
|
@ -16,6 +16,7 @@ namespace mkvmuxer {
|
||||
class IMkvWriter;
|
||||
|
||||
const uint64 kEbmlUnknownValue = 0x01FFFFFFFFFFFFFFULL;
|
||||
const int64 kMaxBlockTimecode = 0x07FFFLL;
|
||||
|
||||
// Writes out |value| in Big Endian order. Returns 0 on success.
|
||||
int32 SerializeInt(IMkvWriter* writer, int64 value, int32 size);
|
||||
|
Loading…
x
Reference in New Issue
Block a user