summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/ACodec.cpp
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2013-04-09 14:57:38 -0700
committerMarco Nelissen <marcone@google.com>2013-04-12 09:33:40 -0700
commitb3ac921cae96686ec0902796bb8f8ef99ae08abd (patch)
treead2cbf69f3794972f9cbf5e5db83a5829e22f8de /media/libstagefright/ACodec.cpp
parent5544c66ba0aa789a997b376df503a5ffae425dc7 (diff)
downloadframeworks_av-b3ac921cae96686ec0902796bb8f8ef99ae08abd.zip
frameworks_av-b3ac921cae96686ec0902796bb8f8ef99ae08abd.tar.gz
frameworks_av-b3ac921cae96686ec0902796bb8f8ef99ae08abd.tar.bz2
Fix MediaCodec.flush()
There were two problems here. One was that the skip/cut buffer wasn't cleared when it should be, and the second was that we were always sending the first buffer of encoded data to the AAC decoder twice. b/8543366 Change-Id: Ic040edabf16cccd1f6ef8c9e5c9cfbacbdd8a089
Diffstat (limited to 'media/libstagefright/ACodec.cpp')
-rw-r--r--media/libstagefright/ACodec.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index ff72b71..31a9490 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -3626,7 +3626,6 @@ bool ACodec::ExecutingState::onMessageReceived(const sp<AMessage> &msg) {
(status_t)OK);
mCodec->changeState(mCodec->mFlushingState);
-
handled = true;
break;
}
@@ -4141,6 +4140,10 @@ void ACodec::FlushingState::changeStateIfWeOwnAllBuffers() {
mCodec->mInputEOSResult = OK;
+ if (mCodec->mSkipCutBuffer != NULL) {
+ mCodec->mSkipCutBuffer->clear();
+ }
+
mCodec->changeState(mCodec->mExecutingState);
}
}