CCodec: don't drop work with format change
Bug: 151995371
Test: atest CtsMediaTestCases -- --module-arg CtsMediaTestCases:size:small
Change-Id: I335519cddf762adb39e7518f15b1cfecf1d43550
diff --git a/media/codec2/sfplugin/CCodecBufferChannel.cpp b/media/codec2/sfplugin/CCodecBufferChannel.cpp
index 6b389d5..ecb7ee6 100644
--- a/media/codec2/sfplugin/CCodecBufferChannel.cpp
+++ b/media/codec2/sfplugin/CCodecBufferChannel.cpp
@@ -1704,8 +1704,8 @@
}
}
- if (!buffer && !flags) {
- ALOGV("[%s] onWorkDone: Not reporting output buffer (%lld)",
+ if (!buffer && !flags && outputFormat == nullptr) {
+ ALOGV("[%s] onWorkDone: nothing to report from the work (%lld)",
mName, work->input.ordinal.frameIndex.peekull());
return true;
}