Log which OMX component is not returning all buffers to us on executing->idle.
Change-Id: I8cd102cc5b1f3c9c36e3c5832ae4bee75c471efd
related-to-bug: 6498711
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 6083cd410..ba8dd57 100755
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -2588,13 +2588,23 @@
} else {
CHECK_EQ((int)mState, (int)EXECUTING_TO_IDLE);
- CHECK_EQ(
- countBuffersWeOwn(mPortBuffers[kPortIndexInput]),
- mPortBuffers[kPortIndexInput].size());
+ if (countBuffersWeOwn(mPortBuffers[kPortIndexInput]) !=
+ mPortBuffers[kPortIndexInput].size()) {
+ ALOGE("Codec did not return all input buffers "
+ "(received %d / %d)",
+ countBuffersWeOwn(mPortBuffers[kPortIndexInput]),
+ mPortBuffers[kPortIndexInput].size());
+ TRESPASS();
+ }
- CHECK_EQ(
- countBuffersWeOwn(mPortBuffers[kPortIndexOutput]),
- mPortBuffers[kPortIndexOutput].size());
+ if (countBuffersWeOwn(mPortBuffers[kPortIndexOutput]) !=
+ mPortBuffers[kPortIndexOutput].size()) {
+ ALOGE("Codec did not return all output buffers "
+ "(received %d / %d)",
+ countBuffersWeOwn(mPortBuffers[kPortIndexOutput]),
+ mPortBuffers[kPortIndexOutput].size());
+ TRESPASS();
+ }
status_t err = mOMX->sendCommand(
mNode, OMX_CommandStateSet, OMX_StateLoaded);