diff options
-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); |