summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/MediaCodec.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2012-02-24 14:03:27 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-02-24 14:03:27 -0800
commit7fb5e8832f582ec515550696e9dabc3a8d9de14d (patch)
treed0b60e9e6947984b1cd17d91a636270cf4e0e205 /media/libstagefright/MediaCodec.cpp
parent7348f1e937c249b221c7ce9edf241e898d37f190 (diff)
parent8b2a453ab6698eae4560389c6e8f6ecab2643218 (diff)
downloadframeworks_av-7fb5e8832f582ec515550696e9dabc3a8d9de14d.zip
frameworks_av-7fb5e8832f582ec515550696e9dabc3a8d9de14d.tar.gz
frameworks_av-7fb5e8832f582ec515550696e9dabc3a8d9de14d.tar.bz2
Merge "Make sure we return input/output buffers to the codec not just while"
Diffstat (limited to 'media/libstagefright/MediaCodec.cpp')
-rw-r--r--media/libstagefright/MediaCodec.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp
index ad2dfab..e14b1c4 100644
--- a/media/libstagefright/MediaCodec.cpp
+++ b/media/libstagefright/MediaCodec.cpp
@@ -577,7 +577,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) {
{
/* size_t index = */updateBuffers(kPortIndexInput, msg);
- if (mState == FLUSHING) {
+ if (mState == FLUSHING || mState == STOPPING) {
returnBuffersToCodecOnPort(kPortIndexInput);
break;
}
@@ -596,7 +596,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) {
{
/* size_t index = */updateBuffers(kPortIndexOutput, msg);
- if (mState == FLUSHING) {
+ if (mState == FLUSHING || mState == STOPPING) {
returnBuffersToCodecOnPort(kPortIndexOutput);
break;
}