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

Commit 5ab055a9 authored by Sham Rathod's avatar Sham Rathod
Browse files

MediaMuxer: Create FullBox for APV

APV box extends ISOBMFF `FullBox`. `FullBox` has extra 32 bits of
data containing flag and version. Thus, added 4 byte data in apvC
box creation.

Bug: 392976813
Bug: 392976819
Test: atest MediaMuxerTest
Change-Id: I703e3e7b6e5515bd777a227c8ca11f4a1ff48ba7
parent 2e264b11
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -5128,6 +5128,9 @@ void MPEG4Writer::Track::writeApvcBox() {
    CHECK_GE(mCodecSpecificDataSize, 4u);

    mOwner->beginBox("apvC");
    // apvC extends FullBox and hence the need to write first
    // 4 bytes here when compared with av1C which extends Box.
    mOwner->writeInt32(0);  // version=0, flags=0
    mOwner->write(mCodecSpecificData, mCodecSpecificDataSize);
    mOwner->endBox();  // apvC
}