summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-10-20 14:33:06 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-10-20 14:33:06 -0700
commit244c73a2f07d4d88e3aace982e522a1d90ff49cf (patch)
tree68990e1fc1784603da283b67aae378d01c8eaae1
parentdc99cd65fac3964637f2674db07323c07f720279 (diff)
parent5f995b0e72ed6f186cb0ab2a525c4cfce614f3a9 (diff)
downloadframeworks_av-244c73a2f07d4d88e3aace982e522a1d90ff49cf.zip
frameworks_av-244c73a2f07d4d88e3aace982e522a1d90ff49cf.tar.gz
frameworks_av-244c73a2f07d4d88e3aace982e522a1d90ff49cf.tar.bz2
Merge "Make sure we can encode the size of the codec specific data in a single byte."
-rw-r--r--media/libstagefright/MPEG4Writer.cpp3
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);