Merge "Allocate new native handle to store sidebandStream"

am: 194170e7f7

Change-Id: I5cd3245cebc24adacbe6417b07aaeb747d966fca
This commit is contained in:
Takayuki Hoshi
2018-09-20 23:54:12 -07:00
committed by android-build-merger

View File

@@ -390,7 +390,11 @@ int JTvInputHal::addOrUpdateStream(int deviceId, int streamId, const sp<Surface>
[&result, &sidebandStream](Result res, const native_handle_t* handle) {
result = res;
if (res == Result::OK) {
sidebandStream = handle;
if (handle) {
sidebandStream = native_handle_clone(handle);
} else {
result = Result::UNKNOWN;
}
}
});
if (result != Result::OK) {
@@ -398,7 +402,7 @@ int JTvInputHal::addOrUpdateStream(int deviceId, int streamId, const sp<Surface>
result);
return UNKNOWN_ERROR;
}
connection.mSourceHandle = NativeHandle::create((native_handle_t*)sidebandStream, false);
connection.mSourceHandle = NativeHandle::create((native_handle_t*)sidebandStream, true);
}
connection.mSurface = surface;
if (connection.mSurface != nullptr) {