diff options
| author | 2010-10-20 14:33:06 -0700 | |
|---|---|---|
| committer | 2010-10-20 14:33:06 -0700 | |
| commit | 1dcb42b772c325620008581fa54a357e659f3385 (patch) | |
| tree | 5447b9be6d56cc77b08d7be4f9d9c014a2149ec3 | |
| parent | e6aaa3da3359cb7c48a9d54376e0880497c22cc8 (diff) | |
| parent | 1df9a7b133d37a1d5b8c087a72bd1473e10ab475 (diff) | |
Merge "Make sure we can encode the size of the codec specific data in a single byte."
| -rw-r--r-- | media/libstagefright/MPEG4Writer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp index e53b0a0bc9ff..6c8287c5b47e 100644 --- a/media/libstagefright/MPEG4Writer.cpp +++ b/media/libstagefright/MPEG4Writer.cpp @@ -2194,6 +2194,9 @@ void MPEG4Writer::Track::writeTrackHeader( CHECK(mCodecSpecificData); CHECK(mCodecSpecificDataSize > 0); + // Make sure all sizes encode to a single byte. + CHECK(mCodecSpecificDataSize + 23 < 128); + mOwner->writeInt32(0); // version=0, flags=0 mOwner->writeInt8(0x03); // ES_DescrTag mOwner->writeInt8(23 + mCodecSpecificDataSize); |