summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2014-12-08 19:37:02 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-08 19:37:02 +0000
commite09bf82465ff83f4da966b77d551367f7c050154 (patch)
tree48f1fa8084b86bf3586aa6c2edabec5701116a28 /media
parent1ed99f0c1b9d7c4fbf2a59b3aeeb4901cc536e5c (diff)
parent6874ed79fd525cf5d6ec8a953475c14f5a185cb4 (diff)
downloadframeworks_av-e09bf82465ff83f4da966b77d551367f7c050154.zip
frameworks_av-e09bf82465ff83f4da966b77d551367f7c050154.tar.gz
frameworks_av-e09bf82465ff83f4da966b77d551367f7c050154.tar.bz2
am 6874ed79: am a9d2f9fb: Merge "stagefright: preserve output format flags on format change" into lmp-mr1-dev
* commit '6874ed79fd525cf5d6ec8a953475c14f5a185cb4': stagefright: preserve output format flags on format change
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/ACodec.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 7dfd8d6..ef21c9a 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -1157,7 +1157,7 @@ status_t ACodec::configureCodec(
}
sp<AMessage> inputFormat = new AMessage();
- sp<AMessage> outputFormat = new AMessage();
+ sp<AMessage> outputFormat = mNotify->dup(); // will use this for kWhatOutputFormatChanged
mIsEncoder = encoder;
@@ -1542,6 +1542,8 @@ status_t ACodec::configureCodec(
err = setMinBufferSize(kPortIndexInput, 8192); // XXX
}
+ mBaseOutputFormat = outputFormat;
+
CHECK_EQ(getPortFormat(kPortIndexInput, inputFormat), (status_t)OK);
CHECK_EQ(getPortFormat(kPortIndexOutput, outputFormat), (status_t)OK);
mInputFormat = inputFormat;
@@ -3531,7 +3533,7 @@ status_t ACodec::getPortFormat(OMX_U32 portIndex, sp<AMessage> &notify) {
}
void ACodec::sendFormatChange(const sp<AMessage> &reply) {
- sp<AMessage> notify = mNotify->dup();
+ sp<AMessage> notify = mBaseOutputFormat->dup();
notify->setInt32("what", kWhatOutputFormatChanged);
CHECK_EQ(getPortFormat(kPortIndexOutput, notify), (status_t)OK);
@@ -4645,6 +4647,7 @@ void ACodec::LoadedState::stateEntered() {
mCodec->mRepeatFrameDelayUs = -1ll;
mCodec->mInputFormat.clear();
mCodec->mOutputFormat.clear();
+ mCodec->mBaseOutputFormat.clear();
if (mCodec->mShutdownInProgress) {
bool keepComponentAllocated = mCodec->mKeepComponentAllocated;