2016-04-27 09:09:13 +02:00
|
|
|
# HG changeset patch
|
|
|
|
# User Wolfgang Rosenauer <wr@rosenauer.org>
|
2016-04-27 10:37:08 +02:00
|
|
|
# Parent 5f8b5e8163ece92dc819896dd52b9dbf5f524fe3
|
2016-04-27 09:09:13 +02:00
|
|
|
|
|
|
|
diff --git a/media/libstagefright/binding/include/mp4_demuxer/ByteWriter.h b/media/libstagefright/binding/include/mp4_demuxer/ByteWriter.h
|
|
|
|
--- a/media/libstagefright/binding/include/mp4_demuxer/ByteWriter.h
|
|
|
|
+++ b/media/libstagefright/binding/include/mp4_demuxer/ByteWriter.h
|
2016-04-27 10:37:08 +02:00
|
|
|
@@ -19,57 +19,64 @@ public:
|
|
|
|
{
|
|
|
|
}
|
|
|
|
~ByteWriter()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2016-04-27 09:09:13 +02:00
|
|
|
void WriteU8(uint8_t aByte)
|
|
|
|
{
|
2016-04-27 10:37:08 +02:00
|
|
|
- mPtr.append(aByte);
|
|
|
|
+ bool rv;
|
|
|
|
+ rv = mPtr.append(aByte);
|
2016-04-27 09:09:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void WriteU16(uint16_t aShort)
|
|
|
|
{
|
|
|
|
uint8_t c[2];
|
|
|
|
+ bool rv;
|
|
|
|
mozilla::BigEndian::writeUint16(&c[0], aShort);
|
|
|
|
- mPtr.append(&c[0], 2);
|
|
|
|
+ rv = mPtr.append(&c[0], 2);
|
|
|
|
}
|
|
|
|
|
|
|
|
void WriteU32(uint32_t aLong)
|
|
|
|
{
|
|
|
|
uint8_t c[4];
|
|
|
|
+ bool rv;
|
|
|
|
mozilla::BigEndian::writeUint32(&c[0], aLong);
|
|
|
|
- mPtr.append(&c[0], 4);
|
|
|
|
+ rv = mPtr.append(&c[0], 4);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Write32(int32_t aLong)
|
|
|
|
{
|
|
|
|
uint8_t c[4];
|
2016-04-27 10:37:08 +02:00
|
|
|
+ bool rv;
|
2016-04-27 09:09:13 +02:00
|
|
|
mozilla::BigEndian::writeInt32(&c[0], aLong);
|
2016-04-27 10:37:08 +02:00
|
|
|
- mPtr.append(&c[0], 4);
|
|
|
|
+ rv = mPtr.append(&c[0], 4);
|
2016-04-27 09:09:13 +02:00
|
|
|
}
|
2016-04-27 10:37:08 +02:00
|
|
|
|
|
|
|
void WriteU64(uint64_t aLongLong)
|
|
|
|
{
|
2016-04-27 09:09:13 +02:00
|
|
|
uint8_t c[8];
|
2016-04-27 10:37:08 +02:00
|
|
|
+ bool rv;
|
2016-04-27 09:09:13 +02:00
|
|
|
mozilla::BigEndian::writeUint64(&c[0], aLongLong);
|
2016-04-27 10:37:08 +02:00
|
|
|
- mPtr.append(&c[0], 8);
|
|
|
|
+ rv = mPtr.append(&c[0], 8);
|
2016-04-27 09:09:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void Write64(int64_t aLongLong)
|
|
|
|
{
|
|
|
|
uint8_t c[8];
|
|
|
|
+ bool rv;
|
|
|
|
mozilla::BigEndian::writeInt64(&c[0], aLongLong);
|
|
|
|
- mPtr.append(&c[0], 8);
|
|
|
|
+ rv = mPtr.append(&c[0], 8);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Write(const uint8_t* aSrc, size_t aCount)
|
|
|
|
{
|
2016-04-27 10:37:08 +02:00
|
|
|
- mPtr.append(aSrc, aCount);
|
|
|
|
+ bool rv;
|
|
|
|
+ rv = mPtr.append(aSrc, aCount);
|
2016-04-27 09:09:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
2016-04-27 10:37:08 +02:00
|
|
|
mozilla::Vector<uint8_t>& mPtr;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|