summaryrefslogtreecommitdiffstats
path: root/libvideoeditor/lvpp/VideoEditorPreviewController.cpp
diff options
context:
space:
mode:
authorSantosh Madhava <smadhava@google.com>2011-02-03 16:59:47 -0800
committerDharmaray Kundargi <dharmaray@google.com>2011-02-03 19:33:34 -0800
commitbfece17c8f63de4d4b686da50f8ecac2f6f8ec53 (patch)
tree8026f852eabf623a7a2b149971d9b254cf07ad51 /libvideoeditor/lvpp/VideoEditorPreviewController.cpp
parent12db816fa13a3963183e45e397954a32418c3ee3 (diff)
downloadframeworks_av-bfece17c8f63de4d4b686da50f8ecac2f6f8ec53.zip
frameworks_av-bfece17c8f63de4d4b686da50f8ecac2f6f8ec53.tar.gz
frameworks_av-bfece17c8f63de4d4b686da50f8ecac2f6f8ec53.tar.bz2
Fix for 3409334 Movie Studio "Force Close" after importing a 3gp video
Change-Id: I37949140a6c37a0c2d04221e220e7e267b6c7a02
Diffstat (limited to 'libvideoeditor/lvpp/VideoEditorPreviewController.cpp')
-rwxr-xr-xlibvideoeditor/lvpp/VideoEditorPreviewController.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/libvideoeditor/lvpp/VideoEditorPreviewController.cpp b/libvideoeditor/lvpp/VideoEditorPreviewController.cpp
index fd04fd5..78f0cda 100755
--- a/libvideoeditor/lvpp/VideoEditorPreviewController.cpp
+++ b/libvideoeditor/lvpp/VideoEditorPreviewController.cpp
@@ -705,9 +705,11 @@ M4OSA_ERR VideoEditorPreviewController::clearSurface(
// Initialize the renderer
if(mTarget == NULL) {
- mTarget = new PreviewRenderer(
+
+ mTarget = PreviewRenderer::CreatePreviewRenderer(
OMX_COLOR_FormatYUV420Planar, surface, outputBufferWidth, outputBufferHeight,
outputBufferWidth, outputBufferHeight, 0);
+
if(mTarget == NULL) {
LOGE("renderPreviewFrame: cannot create PreviewRenderer");
return M4ERR_ALLOC;
@@ -750,7 +752,6 @@ M4OSA_ERR VideoEditorPreviewController::renderPreviewFrame(
M4OSA_UInt32 i = 0, iIncrementedDuration = 0, tnTimeMs=0, framesize =0;
VideoEditor_renderPreviewFrameStr* pFrameStr = pFrameInfo;
M4VIFI_UInt8 *pixelArray = NULL;
-
Mutex::Autolock autoLock(mLock);
// Get the Isurface to be passed to renderer
@@ -774,9 +775,14 @@ M4OSA_ERR VideoEditorPreviewController::renderPreviewFrame(
// Initialize the renderer
if(mTarget == NULL) {
- mTarget = new PreviewRenderer(
+ /*mTarget = new PreviewRenderer(
+ OMX_COLOR_FormatYUV420Planar, surface, mOutputVideoWidth, mOutputVideoHeight,
+ mOutputVideoWidth, mOutputVideoHeight, 0);*/
+
+ mTarget = PreviewRenderer::CreatePreviewRenderer(
OMX_COLOR_FormatYUV420Planar, surface, mOutputVideoWidth, mOutputVideoHeight,
mOutputVideoWidth, mOutputVideoHeight, 0);
+
if(mTarget == NULL) {
LOGE("renderPreviewFrame: cannot create PreviewRenderer");
return M4ERR_ALLOC;