libwebm: Remove STL dependency from Android build.

Change-Id: Id2f378f2fa8350aae97394bd8b21918cff4d179a
This commit is contained in:
Frank Galligan
2013-04-15 10:24:34 -07:00
parent d5cb6c7fa4
commit 64cee42b85
3 changed files with 4 additions and 5 deletions

View File

@@ -12,7 +12,6 @@
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include <ctime> #include <ctime>
#include <limits>
#include <new> #include <new>
#include "mkvmuxerutil.hpp" #include "mkvmuxerutil.hpp"
@@ -1466,7 +1465,7 @@ bool Cluster::DoWriteBlock(
if (rel_timecode < 0) if (rel_timecode < 0)
return false; return false;
if (rel_timecode > std::numeric_limits<int16>::max()) if (rel_timecode > kMaxBlockTimecode)
return false; return false;
if (write_block == NULL) if (write_block == NULL)
@@ -2347,7 +2346,7 @@ int Segment::TestFrame(uint64 track_number,
const int64 delta_timecode = frame_timecode - last_cluster_timecode; const int64 delta_timecode = frame_timecode - last_cluster_timecode;
if (delta_timecode > std::numeric_limits<int16>::max()) if (delta_timecode > kMaxBlockTimecode)
return 2; return 2;
// We decide to create a new cluster when we have a video keyframe. // We decide to create a new cluster when we have a video keyframe.

View File

@@ -21,7 +21,6 @@
#include <cstring> #include <cstring>
#include <ctime> #include <ctime>
#include <limits>
#include <new> #include <new>
#include "mkvwriter.hpp" #include "mkvwriter.hpp"
@@ -335,7 +334,7 @@ uint64 WriteSimpleBlock(IMkvWriter* writer,
// is a signed, 16-bit integer). However, as a simplification we // is a signed, 16-bit integer). However, as a simplification we
// only permit non-negative cluster-relative timestamps for blocks. // 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; return false;
if (WriteID(writer, kMkvSimpleBlock)) if (WriteID(writer, kMkvSimpleBlock))

View File

@@ -16,6 +16,7 @@ namespace mkvmuxer {
class IMkvWriter; class IMkvWriter;
const uint64 kEbmlUnknownValue = 0x01FFFFFFFFFFFFFFULL; const uint64 kEbmlUnknownValue = 0x01FFFFFFFFFFFFFFULL;
const int64 kMaxBlockTimecode = 0x07FFFLL;
// Writes out |value| in Big Endian order. Returns 0 on success. // Writes out |value| in Big Endian order. Returns 0 on success.
int32 SerializeInt(IMkvWriter* writer, int64 value, int32 size); int32 SerializeInt(IMkvWriter* writer, int64 value, int32 size);