OSDN Git Service

Fix for issue 3410180: Small green lines at end of surface after removing last media...
authorDheeraj Sharma <dheerajs@google.com>
Tue, 1 Feb 2011 02:05:50 +0000 (18:05 -0800)
committerDheeraj Sharma <dheerajs@google.com>
Tue, 1 Feb 2011 02:05:50 +0000 (18:05 -0800)
Change-Id: I49695d5d77709da66ffa44d648b35e194f069a7f

libvideoeditor/lvpp/VideoEditorPreviewController.cpp

index 744d410..fd04fd5 100755 (executable)
@@ -700,18 +700,14 @@ M4OSA_ERR VideoEditorPreviewController::clearSurface(
         mTarget = NULL;\r
     }\r
 \r
-    if(mOutputVideoWidth == 0) {\r
-        mOutputVideoWidth = pFrameStr->uiFrameWidth;\r
-    }\r
-    if(mOutputVideoHeight == 0) {\r
-        mOutputVideoHeight = pFrameStr->uiFrameHeight;\r
-    }\r
+    outputBufferWidth = pFrameStr->uiFrameWidth;\r
+    outputBufferHeight = pFrameStr->uiFrameHeight;\r
 \r
     // Initialize the renderer\r
     if(mTarget == NULL) {\r
         mTarget = new PreviewRenderer(\r
-            OMX_COLOR_FormatYUV420Planar, surface, mOutputVideoWidth, mOutputVideoHeight,\r
-            mOutputVideoWidth, mOutputVideoHeight, 0);\r
+            OMX_COLOR_FormatYUV420Planar, surface, outputBufferWidth, outputBufferHeight,\r
+            outputBufferWidth, outputBufferHeight, 0);\r
         if(mTarget == NULL) {\r
             LOGE("renderPreviewFrame: cannot create PreviewRenderer");\r
             return M4ERR_ALLOC;\r
@@ -727,8 +723,8 @@ M4OSA_ERR VideoEditorPreviewController::clearSurface(
 \r
     // Set the output YUV420 plane to be compatible with YV12 format\r
     //In YV12 format, sizes must be even\r
-    M4OSA_UInt32 yv12PlaneWidth = ((mOutputVideoWidth +1)>>1)<<1;\r
-    M4OSA_UInt32 yv12PlaneHeight = ((mOutputVideoHeight+1)>>1)<<1;\r
+    M4OSA_UInt32 yv12PlaneWidth = ((outputBufferWidth +1)>>1)<<1;\r
+    M4OSA_UInt32 yv12PlaneHeight = ((outputBufferHeight+1)>>1)<<1;\r
 \r
     prepareYV12ImagePlane(planeOut, yv12PlaneWidth, yv12PlaneHeight,\r
      (M4OSA_UInt32)outBufferStride, (M4VIFI_UInt8 *)outBuffer);\r