From 7f0ce8d629b731705341942f1308b91cba9ea29c Mon Sep 17 00:00:00 2001 From: Dharmaray Kundargi Date: Fri, 28 Jan 2011 18:40:32 -0800 Subject: [PATCH] Crash in prepare player. Issue No 3403342 Avoid race in preparing the same player twice. Change-Id: I5a735e54b94cd0dd435a066a92b1353e761eafc6 --- libvideoeditor/lvpp/VideoEditorPreviewController.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libvideoeditor/lvpp/VideoEditorPreviewController.cpp b/libvideoeditor/lvpp/VideoEditorPreviewController.cpp index 7f63eb3e94..5128a41691 100755 --- a/libvideoeditor/lvpp/VideoEditorPreviewController.cpp +++ b/libvideoeditor/lvpp/VideoEditorPreviewController.cpp @@ -1068,6 +1068,8 @@ M4OSA_ERR VideoEditorPreviewController::threadProc(M4OSA_Void* param) { pController->mPrepareReqest = M4OSA_FALSE; preparePlayer((void*)pController, pController->mCurrentPlayer, pController->mCurrentClipNumber+1); + err = M4OSA_semaphoreWait(pController->mSemThreadWait, + M4OSA_WAIT_FOREVER); } else { if (!pController->bStopThreadInProgress) { LOGV("threadProc: state busy...wait for sem"); -- 2.11.0