Browse files

Merge "Fix a software decoder freeze issue"

  • Loading branch information...
2 parents c5359cc + 62abc71 commit 3032d2a628341089ae65eab2a066bbdf5def2166 James Dong committed with Android (Google) Code Review Mar 9, 2010
Showing with 9 additions and 8 deletions.
  1. +1 −1 android/android_surface_output.cpp
  2. +8 −7 android/android_surface_output.h
View
2 android/android_surface_output.cpp
@@ -48,7 +48,7 @@ OSCL_EXPORT_REF AndroidSurfaceOutput::AndroidSurfaceOutput() :
mPvPlayer = NULL;
mEmulation = false;
iEosReceived = false;
- mNumberOfFramesToHold = 2;
+ mNumberOfFramesToHold = 1;
}
status_t AndroidSurfaceOutput::set(PVPlayer* pvPlayer, const sp<ISurface>& surface, bool emulation)
View
15 android/android_surface_output.h
@@ -315,14 +315,15 @@ class AndroidSurfaceOutput : public OsclTimerObject
bool iIsMIOConfigured;
/*
- * The value of mNumberOfFramesToHold is hardware/platform specific.
- * 1. On non-overlay based platforms, its value it set to 2
- * so as to avoid potential tearings oberved during video playback.
- * 2. On overlay-based platforms, its value should be overwritten.
- * We have observed video decoder starvation when a value other than 1.
+ * The value of mNumberOfFramesToHold is decoder specific.
+ *
+ * Please make sure that the number of unique output buffers from the decoder
+ * (either hardware or software) is not less than 1 + mNumberOfFramesToHold;
+ * otherwise, we will have starvation.
+ *
+ * On some platforms, mNumberOfFramesToHold needs to set to more than 1 (such as
+ * 2) in order to workaround a tearing issue from SF during video playback.
*
- * We set the default value to 2 in this class. Please change its value
- * accordingly in the derived class.
*/
int mNumberOfFramesToHold;

0 comments on commit 3032d2a

Please sign in to comment.