Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1dcb42b7 authored by Andreas Huber's avatar Andreas Huber Committed by Android (Google) Code Review
Browse files

Merge "Make sure we can encode the size of the codec specific data in a single byte."

parents e6aaa3da 1df9a7b1
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);