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

Commit 05575b11 authored by Harish Mahendrakar's avatar Harish Mahendrakar
Browse files

Codec2 decoders: Invalidate allocated graphic buffer in stop()

Bug: 243583691
Test: atest CtsMediaV2TestCases -- --module-arg \
CtsMediaV2TestCases:instrumentation-arg:codec-prefix:=c2.android.

Change-Id: I312c106350b2eb072f0e6f2f9a83f16eb8424cb2
parent eac83464
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -671,6 +671,9 @@ status_t C2SoftAvcDec::resetDecoder() {
void C2SoftAvcDec::resetPlugin() {
    mSignalledOutputEos = false;
    mTimeStart = mTimeEnd = systemTime();
    if (mOutBlock) {
        mOutBlock.reset();
    }
}

status_t C2SoftAvcDec::deleteDecoder() {
+3 −0
Original line number Diff line number Diff line
@@ -664,6 +664,9 @@ status_t C2SoftHevcDec::resetDecoder() {
void C2SoftHevcDec::resetPlugin() {
    mSignalledOutputEos = false;
    mTimeStart = mTimeEnd = systemTime();
    if (mOutBlock) {
        mOutBlock.reset();
    }
}

status_t C2SoftHevcDec::deleteDecoder() {
+3 −0
Original line number Diff line number Diff line
@@ -732,6 +732,9 @@ status_t C2SoftMpeg2Dec::resetDecoder() {
void C2SoftMpeg2Dec::resetPlugin() {
    mSignalledOutputEos = false;
    mTimeStart = mTimeEnd = systemTime();
    if (mOutBlock) {
        mOutBlock.reset();
    }
}

status_t C2SoftMpeg2Dec::deleteDecoder() {
+3 −1
Original line number Diff line number Diff line
@@ -256,7 +256,9 @@ c2_status_t C2SoftMpeg4Dec::onStop() {
    mFramesConfigured = false;
    mSignalledOutputEos = false;
    mSignalledError = false;

    if (mOutBlock) {
        mOutBlock.reset();
    }
    return C2_OK;
}