Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 194170e7 authored by Takayuki Hoshi's avatar Takayuki Hoshi Committed by Gerrit Code Review
Browse files

Merge "Allocate new native handle to store sidebandStream"

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