commit | b6537d0439df5c88c8f1d4e0bddb0ff003d29fd3 | [log] [tgz] |
---|---|---|
author | TreeHugger Robot <treehugger-gerrit@google.com> | Fri Jun 12 22:55:21 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Fri Jun 12 22:55:21 2020 +0000 |
tree | dfdfcf04beaa65c9807f0544d295ab4a5e7cc0e5 | |
parent | 628832008d6095adba932d0a3e75ab5ae556bb6b [diff] | |
parent | 19d51164324653a7312c6d7bc0fd0ac43d581503 [diff] |
Merge "CCodec: Guard against null output->buffers" into rvc-dev am: 19d5116432 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/11850304 Change-Id: I219eca62b75d1e4870a3444d60d3c9fc15c01cd6
diff --git a/media/codec2/sfplugin/CCodecBufferChannel.cpp b/media/codec2/sfplugin/CCodecBufferChannel.cpp index c07f3dc..2cd357b 100644 --- a/media/codec2/sfplugin/CCodecBufferChannel.cpp +++ b/media/codec2/sfplugin/CCodecBufferChannel.cpp
@@ -618,13 +618,14 @@ } void CCodecBufferChannel::feedInputBufferIfAvailableInternal() { - if (mInputMetEos || - mOutput.lock()->buffers->hasPending() || - mPipelineWatcher.lock()->pipelineFull()) { + if (mInputMetEos || mPipelineWatcher.lock()->pipelineFull()) { return; - } else { + } + { Mutexed<Output>::Locked output(mOutput); - if (!output->buffers || output->buffers->numClientBuffers() >= output->numSlots) { + if (!output->buffers || + output->buffers->hasPending() || + output->buffers->numClientBuffers() >= output->numSlots) { return; } }