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
gugelfrei
Rakesh Kumar 5 years ago
parent 0647d8c5f6
commit d5ea3f3546

@ -244,8 +244,8 @@ void CodecHandler::onMessageReceived(const sp<AMessage> &msg) {
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);

Loading…
Cancel
Save