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

Commit 437f549b authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "codec2: Set custom ordinal for inputs processed by FrameReassembler" am: 5e3cf46b

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1648893

Change-Id: I0b60e0da9fa83ee59eacd0049ee93e3034cd02fe
parents 53b1a632 5e3cf46b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -143,6 +143,7 @@ c2_status_t FrameReassembler::process(

    if (buffer->size() > 0) {
        mCurrentOrdinal.timestamp = timeUs;
        mCurrentOrdinal.customOrdinal = timeUs;
    }

    size_t frameSizeBytes = mFrameSize.value() * mChannelCount * bytesPerSample();
@@ -219,6 +220,7 @@ void FrameReassembler::finishCurrentBlock(std::list<std::unique_ptr<C2Work>> *it

    ++mCurrentOrdinal.frameIndex;
    mCurrentOrdinal.timestamp += mFrameSize.value() * 1000000 / mSampleRate;
    mCurrentOrdinal.customOrdinal = mCurrentOrdinal.timestamp;
    mCurrentBlock.reset();
    mWriteView.reset();
}