commit | 88a9462b3558f8af16f0c8a1cccdd098b6c62371 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Wed May 12 19:47:39 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed May 12 19:47:39 2021 +0000 |
tree | 49ddcef448ed00cc08de5f09ea04ccad38576b96 | |
parent | d55621238a7bf7326e1332dd268d8317dbdb141b [diff] | |
parent | bffaa476e34712776297bbef21295057eb0c07c8 [diff] |
Merge "codec2: Avoid sending input done event for incomplete work" am: bffaa476e3 Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1701934 Change-Id: I78f232234dcccfb1eb1746bcd9a6bfc86d7331a6
diff --git a/media/codec2/sfplugin/CCodec.cpp b/media/codec2/sfplugin/CCodec.cpp index 592ff31..e812be2 100644 --- a/media/codec2/sfplugin/CCodec.cpp +++ b/media/codec2/sfplugin/CCodec.cpp
@@ -2264,7 +2264,12 @@ } } if (config->mInputSurface) { - config->mInputSurface->onInputBufferDone(work->input.ordinal.frameIndex); + if (work->worklets.empty() + || !work->worklets.back() + || (work->worklets.back()->output.flags + & C2FrameData::FLAG_INCOMPLETE) == 0) { + config->mInputSurface->onInputBufferDone(work->input.ordinal.frameIndex); + } } if (initDataWatcher.hasChanged()) { initData = initDataWatcher.update();