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

Commit b8fe01e5 authored by ted.sun's avatar ted.sun Committed by Henry Fang
Browse files

CCodec: don't drop metadata for output with flag FLAG_DROP_FRAME.

Bug: 151995371
Test: local test ok.
Change-Id: I882b791f3d16a17ffd47ce0bf9e40c64c8b90357
(cherry picked from commit 55eff1412e942c13b0fc4af1f846843a554d7068)
parent 7d90914e
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -1718,7 +1718,13 @@ bool CCodecBufferChannel::handleWork(
        }
        }
    }
    }


    if (notifyClient && !buffer && !flags) {
    bool drop = false;
    if (worklet->output.flags & C2FrameData::FLAG_DROP_FRAME) {
        ALOGV("[%s] onWorkDone: drop buffer but keep metadata", mName);
        drop = true;
    }

    if (notifyClient && !buffer && !flags && !drop) {
        ALOGV("[%s] onWorkDone: Not reporting output buffer (%lld)",
        ALOGV("[%s] onWorkDone: Not reporting output buffer (%lld)",
              mName, work->input.ordinal.frameIndex.peekull());
              mName, work->input.ordinal.frameIndex.peekull());
        notifyClient = false;
        notifyClient = false;