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

Commit 7427d375 authored by Chih-Yu Huang's avatar Chih-Yu Huang Committed by Chih-yu Huang
Browse files

CCBC: Fix null pointer exception at CCBC::flush()

The description of C2Work says:
"When the work is returned (via onWorkDone), the input buffer-pack's
buffer vector shall contain nullptrs." This CL handles the case that
C2Work's input buffers contains nullptr.

Bug: 174432542
Test: android.mediav2.cts.CodecDecoderSurfaceTest
Change-Id: Ife7fb849c88c82f92a0bb687b5f1f6bcb171686b
parent 9b95dd2f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1403,6 +1403,7 @@ void CCodecBufferChannel::flush(const std::list<std::unique_ptr<C2Work>> &flushe
                continue;
            }
            if (work->input.buffers.empty()
                    || work->input.buffers.front() == nullptr
                    || work->input.buffers.front()->data().linearBlocks().empty()) {
                ALOGD("[%s] no linear codec config data found", mName);
                continue;