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

Commit 7db68c9c authored by codeworkx's avatar codeworkx Committed by Ricardo Cerqueira
Browse files

libstagefright: exynos4: set proper eColorFormat

Change-Id: Ie025face3c292e685fdf4d83c99276b0a9e4d71d
parent bf3be126
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -807,7 +807,7 @@ status_t OMXCodec::isColorFormatSupported(
        // the incremented index (bug 2897413).
        CHECK_EQ(index, portFormat.nIndex);
        if (portFormat.eColorFormat == colorFormat) {
            CODEC_LOGV("Found supported color format: %d", portFormat.eColorFormat);
            CODEC_LOGE("Found supported color format: %d", portFormat.eColorFormat);
            return OK;  // colorFormat is supported!
        }
        ++index;
@@ -1809,6 +1809,12 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() {
        eColorFormat = (OMX_COLOR_FORMATTYPE)HAL_PIXEL_FORMAT_YCbCr_420_P;
        break;
    }

    err = native_window_set_buffers_geometry(
            mNativeWindow.get(),
            def.format.video.nFrameWidth,
            def.format.video.nFrameHeight,
            eColorFormat);
#endif

    if (err != 0) {