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

Commit 1df9a7b1 authored by Andreas Huber's avatar Andreas Huber
Browse files

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

Change-Id: If7680cbfb380180c8dd6d6019b9c6c67661e468d
parent 92f987a0
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);