diff options
author | Andreas Huber <andih@google.com> | 2010-10-20 14:29:41 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-10-20 14:29:41 -0700 |
commit | 5f995b0e72ed6f186cb0ab2a525c4cfce614f3a9 (patch) | |
tree | 2f32f405eb5dbf562bd8b1986f2ac54f23ab1525 | |
parent | 6a9da9fc558263548ebfbae2cbf177eb7454a41b (diff) | |
download | frameworks_av-5f995b0e72ed6f186cb0ab2a525c4cfce614f3a9.zip frameworks_av-5f995b0e72ed6f186cb0ab2a525c4cfce614f3a9.tar.gz frameworks_av-5f995b0e72ed6f186cb0ab2a525c4cfce614f3a9.tar.bz2 |
Make sure we can encode the size of the codec specific data in a single byte.
Change-Id: If7680cbfb380180c8dd6d6019b9c6c67661e468d
-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 e53b0a0..6c8287c 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); |