summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/OMXCodec.cpp
diff options
context:
space:
mode:
authorRonghua Wu <ronghuawu@google.com>2014-08-04 16:59:20 -0700
committerRonghua Wu <ronghuawu@google.com>2014-08-19 09:31:54 -0700
commita518dd9ac06d519bf226e6b1e952f85d6078eecc (patch)
tree4c29c394821d5123f96ea527c745ef1ff3fdf73c /media/libstagefright/OMXCodec.cpp
parent44a5a202101614302f607228d4357496b350bab4 (diff)
downloadframeworks_av-a518dd9ac06d519bf226e6b1e952f85d6078eecc.zip
frameworks_av-a518dd9ac06d519bf226e6b1e952f85d6078eecc.tar.gz
frameworks_av-a518dd9ac06d519bf226e6b1e952f85d6078eecc.tar.bz2
stagefright: Fix thumbnail generation for some clips.
Fix thumbnail generation for clips that include an immediate resolution change: * Enable dynamic resolution change, when port settings may change while we have filled buffers. * Handle the case when port settings change happens right after stop is called. Bug: 16210021 Change-Id: I8b2c48365d74ce7551f000a1f4b0711647a9796f
Diffstat (limited to 'media/libstagefright/OMXCodec.cpp')
-rw-r--r--media/libstagefright/OMXCodec.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 3d1d40e..78758da 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -2500,12 +2500,6 @@ void OMXCodec::onEvent(OMX_EVENTTYPE event, OMX_U32 data1, OMX_U32 data2) {
data1, data2);
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 ||
@@ -2899,7 +2893,7 @@ status_t OMXCodec::freeBuffer(OMX_U32 portIndex, size_t bufIndex) {
void OMXCodec::onPortSettingsChanged(OMX_U32 portIndex) {
CODEC_LOGV("PORT_SETTINGS_CHANGED(%ld)", portIndex);
- CHECK_EQ((int)mState, (int)EXECUTING);
+ CHECK(mState == EXECUTING || mState == EXECUTING_TO_IDLE);
CHECK_EQ(portIndex, (OMX_U32)kPortIndexOutput);
CHECK(!mOutputPortSettingsChangedPending);