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

Commit 87eb285d authored by Dima Zavin's avatar Dima Zavin
Browse files

stagefright: set scaling mode for blank frames in ACodec



Analogous to 1d5ac80d
(by jgennis), this sets the scaling mode for the ANativeWindow
to SCALE_TO_WINDOW prior to pushing the blank frames during
decoder tear down.

Without this, the window defaults to FREEZE and SF ignores the
new frames.

Bug: 9516405
Change-Id: I39ef30922d733034bf01100d7ff24ac9c0c33b7d
Signed-off-by: default avatarDima Zavin <dima@android.com>
parent ee5e8d3e
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -2630,6 +2630,14 @@ status_t ACodec::pushBlankBuffersToNativeWindow() {
        goto error;
    }

    err = native_window_set_scaling_mode(mNativeWindow.get(),
                NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW);
    if (err != NO_ERROR) {
        ALOGE("error pushing blank_frames: set_scaling_mode failed: %s (%d)",
              strerror(-err), -err);
        goto error;
    }

    err = native_window_set_usage(mNativeWindow.get(),
            GRALLOC_USAGE_SW_WRITE_OFTEN);
    if (err != NO_ERROR) {