NdkMediaCodec: Wrong check in error callback handler
NdkMediaCodec checks for wrong item in case of CB_ERROR callback. It
is checking for action instead of actionCode, because of which error
is not getting propagated. This leads to hang in application using
async NdkMediaCodec APIs.
Test: encoderTest --gtest_repeat=20 -P /sdcard/res/
Test: decoderTest --gtest_repeat=20 -P /sdcard/res/
Bug: 141458223
Change-Id: I9da8a361d1925b73f341f36e55f7426888155fc6
diff --git a/media/ndk/NdkMediaCodec.cpp b/media/ndk/NdkMediaCodec.cpp
index c23f19b..51b516a 100644
--- a/media/ndk/NdkMediaCodec.cpp
+++ b/media/ndk/NdkMediaCodec.cpp
@@ -244,8 +244,8 @@
ALOGE("CB_ERROR: err is expected.");
break;
}
- if (!msg->findInt32("action", &actionCode)) {
- ALOGE("CB_ERROR: action is expected.");
+ if (!msg->findInt32("actionCode", &actionCode)) {
+ ALOGE("CB_ERROR: actionCode is expected.");
break;
}
msg->findString("detail", &detail);