summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-09-09 13:19:59 -0700
committerJames Dong <jdong@google.com>2011-09-09 13:27:27 -0700
commit8edb8e82fa886564ee8e72178a1969e2437dd525 (patch)
tree2b5c5bfbe6df89cf5200193992cf66cce868e5fc /media
parentd6e27296206b9f897401107f1c46f4ac2947be85 (diff)
downloadframeworks_av-8edb8e82fa886564ee8e72178a1969e2437dd525.zip
frameworks_av-8edb8e82fa886564ee8e72178a1969e2437dd525.tar.gz
frameworks_av-8edb8e82fa886564ee8e72178a1969e2437dd525.tar.bz2
Don't check mFilledBuffers whether it is empty or not when the port reconfiguration is not meant for buffer reallocation
Change-Id: Iee9b18449bce9d7565ab5cc7f9e999484051196c related-to-bug: 5233843
Diffstat (limited to 'media')
-rwxr-xr-xmedia/libstagefright/OMXCodec.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index fb49d7b..9ab470b 100755
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -50,7 +50,7 @@ namespace android {
// Treat time out as an error if we have not received any output
// buffers after 3 seconds.
-const static int64_t kBufferFilledEventTimeOutUs = 3000000000LL;
+const static int64_t kBufferFilledEventTimeOutNs = 3000000000LL;
struct CodecInfo {
const char *mime;
@@ -2325,9 +2325,14 @@ void OMXCodec::onEvent(OMX_EVENTTYPE event, OMX_U32 data1, OMX_U32 data2) {
{
CODEC_LOGV("OMX_EventPortSettingsChanged(port=%ld, data2=0x%08lx)",
data1, data2);
- CHECK(mFilledBuffers.empty());
if (data2 == 0 || data2 == OMX_IndexParamPortDefinition) {
+ // There is no need to check whether mFilledBuffers is empty or not
+ // when the OMX_EventPortSettingsChanged is not meant for reallocating
+ // the output buffers.
+ if (data1 == kPortIndexOutput) {
+ CHECK(mFilledBuffers.empty());
+ }
onPortSettingsChanged(data1);
} else if (data1 == kPortIndexOutput &&
(data2 == OMX_IndexConfigCommonOutputCrop ||
@@ -3220,7 +3225,7 @@ status_t OMXCodec::waitForBufferFilled_l() {
// for video encoding.
return mBufferFilled.wait(mLock);
}
- status_t err = mBufferFilled.waitRelative(mLock, kBufferFilledEventTimeOutUs);
+ status_t err = mBufferFilled.waitRelative(mLock, kBufferFilledEventTimeOutNs);
if (err != OK) {
CODEC_LOGE("Timed out waiting for output buffers: %d/%d",
countBuffersWeOwn(mPortBuffers[kPortIndexInput]),