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

Commit 9ae27e11 authored by Houxiang Dai's avatar Houxiang Dai Committed by Hongguang Chen
Browse files

Close sidebandHandle to avoid fd leakage

As videos preview start to play on Netflix UI, If it's tunnel mode, it
will configure video tunnel mode each time. This will have fd leakage
for the sidebandHandles that weren't release each time. Eventually,
Netflix will crash due to the fd limit in kernel.

Test:
Netflix preview OK and will not crash

Bug: 136197226
Change-Id: Idea549d34b080baf2875078d96199c480227992f
parent 0d83baaa
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -3270,10 +3270,12 @@ status_t ACodec::configureTunneledVideoPlayback(
    if (err != OK) {
        ALOGE("native_window_set_sideband_stream(%p) failed! (err %d).",
                sidebandHandle, err);
        return err;
    }

    return OK;
    native_handle_close(sidebandHandle);
    native_handle_delete(sidebandHandle);

    return err;
}

status_t ACodec::setVideoPortFormatType(