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

Commit e74e506b authored by Houxiang Dai's avatar Houxiang Dai Committed by Android Build Cherrypicker Worker
Browse files

Add format change check rule

If no buffer, and no outputFormat changed in tunnel mode, the
onOutputBufferAvailable would not be called.

Test:
DTV playback ok

Bug: 234104755
(cherry picked from https://android-review.googlesource.com/q/commit:c5d993692af7af7c886bc8d3e08ec5d019cc06ec)
Merged-In: I96a4dc5733e2b47a9255ae655da2cb23779daa5b
Change-Id: I96a4dc5733e2b47a9255ae655da2cb23779daa5b
parent 5d7b6569
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -2128,8 +2128,15 @@ bool CCodecBufferChannel::handleWork(

    if (notifyClient && !buffer && !flags) {
        if (mTunneled && drop && outputFormat) {
            if (mOutputFormat != outputFormat) {
                ALOGV("[%s] onWorkDone: Keep tunneled, drop frame with format change (%lld)",
                      mName, work->input.ordinal.frameIndex.peekull());
                mOutputFormat = outputFormat;
            } else {
                ALOGV("[%s] onWorkDone: Not reporting output buffer without format change (%lld)",
                      mName, work->input.ordinal.frameIndex.peekull());
                notifyClient = false;
            }
        } else {
            ALOGV("[%s] onWorkDone: Not reporting output buffer (%lld)",
                  mName, work->input.ordinal.frameIndex.peekull());
+1 −0
Original line number Diff line number Diff line
@@ -301,6 +301,7 @@ private:
    std::shared_ptr<C2BlockPool> mInputAllocator;
    QueueSync mQueueSync;
    std::vector<std::unique_ptr<C2Param>> mParamsToBeSet;
    sp<AMessage> mOutputFormat;

    struct Input {
        Input();