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

Commit 60314aed authored by Santhosh Behara's avatar Santhosh Behara Committed by Linux Build Service Account
Browse files

libstagefright: update cttsOffsetTimeUs for video track

Update cttsOffsetTimeUs for all video tracks unlike just
for avc

Change-Id: I16850c96fafbdd6b16dd3e076b871bb80c53b18b
parent d72b9560
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -2362,10 +2362,6 @@ status_t MPEG4Writer::Track::threadEntry() {
                            (const uint8_t *)buffer->data()
                                + buffer->range_offset(),
                            buffer->range_length());
                    int32_t fps;
                    mMeta->findInt32(kKeyFrameRate, &fps);
                    int64_t cttsOffsetTimeUs = 1000000LL/fps;
                    mCttsOffsetTimeUs = cttsOffsetTimeUs + kMinCttsOffsetTimeUs; //delta factor
                    CHECK_EQ((status_t)OK, err);
                } else if (mIsHevc) {
                    status_t err = makeHEVCCodecSpecificData(
@@ -2379,6 +2375,12 @@ status_t MPEG4Writer::Track::threadEntry() {
                }
            }

            if (!mIsAudio) {
                int32_t fps;
                mMeta->findInt32(kKeyFrameRate, &fps);
                int64_t cttsOffsetTimeUs = 1000000LL/fps;
                mCttsOffsetTimeUs = cttsOffsetTimeUs + kMinCttsOffsetTimeUs; //delta factor
            }
            buffer->release();
            buffer = NULL;