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

Commit 6c27e7d8 authored by ted.sun's avatar ted.sun Committed by Houxiang Dai
Browse files

Add pushBlankOnStop fix.

Fix wrong sidebandStream for push-blank-on-stop function.
We should set sidebandStream to nullptr before pushing blank buffer,
because blank buffer doesn't run in tunnel mode.

Test: MMP playback OK
Bug: 287924345
Change-Id: Iebbd11473a1accd2cb1ed71aaebc5a373482210c
parent 60cbc2b5
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -225,6 +225,13 @@ status_t pushBlankBuffersToNativeWindow(ANativeWindow *nativeWindow /* nonnull *
        return err;
    };

    // We need to set sidebandStream to nullptr before pushing blank buffers
    err = native_window_set_sideband_stream(nativeWindow, nullptr);
    if (err != NO_ERROR) {
        ALOGE("error setting sidebandStream to nullptr: %s (%d)", strerror(-err), -err);
        return err;
    }

    // We need to reconnect to the ANativeWindow as a CPU client to ensure that
    // no frames get dropped by SurfaceFlinger assuming that these are video
    // frames.