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

Commit 776daeee authored by Hangyu Kuang's avatar Hangyu Kuang
Browse files

media: Set the correct display width/height in muxer.

Test: Run the NativeDecoderTest
Bug:34094564
Change-Id: Ib5f50afd77030f0ac87a4b0eb659b8f9c2f56987
parent 3cc1da3d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3260,8 +3260,8 @@ void MPEG4Writer::Track::writeTkhdBox(uint32_t now) {
        mOwner->writeInt32(0);
    } else {
        int32_t width, height;
        bool success = mMeta->findInt32(kKeyWidth, &width);
        success = success && mMeta->findInt32(kKeyHeight, &height);
        bool success = mMeta->findInt32(kKeyDisplayWidth, &width);
        success = success && mMeta->findInt32(kKeyDisplayHeight, &height);
        CHECK(success);

        mOwner->writeInt32(width << 16);   // 32-bit fixed-point value