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

Commit 92ba5b79 authored by Dheeraj Sharma's avatar Dheeraj Sharma Committed by Android Git Automerger
Browse files

am b771ec36: Merge "Fix for issue 3410180: Small green lines at end of surface...

am b771ec36: Merge "Fix for issue 3410180: Small green lines at end of surface after removing last media item" into honeycomb

* commit 'b771ec36157c33759c094475d56dac07903af998':
  Fix for issue 3410180: Small green lines at end of surface after removing last media item
parents 382f6a66 c5bee355
Loading
Loading
Loading
Loading
+6 −10
Original line number Diff line number Diff line
@@ -700,18 +700,14 @@ M4OSA_ERR VideoEditorPreviewController::clearSurface(
        mTarget = NULL;
    }

    if(mOutputVideoWidth == 0) {
        mOutputVideoWidth = pFrameStr->uiFrameWidth;
    }
    if(mOutputVideoHeight == 0) {
        mOutputVideoHeight = pFrameStr->uiFrameHeight;
    }
    outputBufferWidth = pFrameStr->uiFrameWidth;
    outputBufferHeight = pFrameStr->uiFrameHeight;

    // Initialize the renderer
    if(mTarget == NULL) {
        mTarget = new PreviewRenderer(
            OMX_COLOR_FormatYUV420Planar, surface, mOutputVideoWidth, mOutputVideoHeight,
            mOutputVideoWidth, mOutputVideoHeight, 0);
            OMX_COLOR_FormatYUV420Planar, surface, outputBufferWidth, outputBufferHeight,
            outputBufferWidth, outputBufferHeight, 0);
        if(mTarget == NULL) {
            LOGE("renderPreviewFrame: cannot create PreviewRenderer");
            return M4ERR_ALLOC;
@@ -727,8 +723,8 @@ M4OSA_ERR VideoEditorPreviewController::clearSurface(

    // Set the output YUV420 plane to be compatible with YV12 format
    //In YV12 format, sizes must be even
    M4OSA_UInt32 yv12PlaneWidth = ((mOutputVideoWidth +1)>>1)<<1;
    M4OSA_UInt32 yv12PlaneHeight = ((mOutputVideoHeight+1)>>1)<<1;
    M4OSA_UInt32 yv12PlaneWidth = ((outputBufferWidth +1)>>1)<<1;
    M4OSA_UInt32 yv12PlaneHeight = ((outputBufferHeight+1)>>1)<<1;

    prepareYV12ImagePlane(planeOut, yv12PlaneWidth, yv12PlaneHeight,
     (M4OSA_UInt32)outBufferStride, (M4VIFI_UInt8 *)outBuffer);