OSDN Git Service

auto import from //depot/cupcake/@136594
authorThe Android Open Source Project <initial-contribution@android.com>
Thu, 5 Mar 2009 22:34:31 +0000 (14:34 -0800)
committerThe Android Open Source Project <initial-contribution@android.com>
Thu, 5 Mar 2009 22:34:31 +0000 (14:34 -0800)
android/android_surface_output.cpp
android/author/authordriver.cpp

index 5fa8760..ba606fd 100644 (file)
@@ -929,9 +929,9 @@ OSCL_EXPORT_REF PVMFStatus AndroidSurfaceOutput::writeFrameBuf(uint8* aData, uin
 {
     if (mSurface == 0) return PVMFFailure;
 
+    if (++mFrameBufferIndex == kBufferCount) mFrameBufferIndex = 0;
     iColorConverter->Convert(aData, static_cast<uint8*>(mFrameHeap->base()) + mFrameBuffers[mFrameBufferIndex]);
     // post to SurfaceFlinger
-    if (++mFrameBufferIndex == kBufferCount) mFrameBufferIndex = 0;
     mSurface->postBuffer(mFrameBuffers[mFrameBufferIndex]);
     return PVMFSuccess;
 }
index f9bacd5..cb1328c 100644 (file)
@@ -708,6 +708,7 @@ int AuthorDriver::authorThread()
 
    //moved below delete this, similar code on playerdriver.cpp caused a crash.
    //cleanup of oscl should happen at the end.
+    OsclScheduler::Cleanup();
     PV_MasterOMX_Deinit();
     UninitializeForThread();
     return 0;