Add missing return in Tuner default impl getAvSharedHandle after hidl_cb
Per CTS automation test failure logs: Abort message: 'getAvSharedHandle: _hidl_cb called a second time, but must be called once.' this should be the root cause of the failure. Couldn't reproduce locally. Test: make Bug: 181997400 Change-Id: Ib3fb5ad535ab51cc7281c3f81a61d1913a1f4e65
This commit is contained in:
parent
f46a812e58
commit
d7ce9e5b17
1 changed files with 3 additions and 0 deletions
|
@ -259,11 +259,14 @@ Return<void> Filter::getAvSharedHandle(getAvSharedHandle_cb _hidl_cb) {
|
|||
int av_fd = createAvIonFd(BUFFER_SIZE_16M);
|
||||
if (av_fd == -1) {
|
||||
_hidl_cb(Result::UNKNOWN_ERROR, NULL, 0);
|
||||
return Void();
|
||||
}
|
||||
|
||||
native_handle_t* nativeHandle = createNativeHandle(av_fd);
|
||||
if (nativeHandle == NULL) {
|
||||
::close(av_fd);
|
||||
_hidl_cb(Result::UNKNOWN_ERROR, NULL, 0);
|
||||
return Void();
|
||||
}
|
||||
mSharedAvMemHandle.setTo(nativeHandle, /*shouldOwn=*/true);
|
||||
::close(av_fd);
|
||||
|
|
Loading…
Reference in a new issue