summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2014-11-20 18:39:26 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-20 18:39:26 +0000
commit9dad026b7c69add31e1cab48774223236efe801e (patch)
treeeab7a69bd4500f45674192a1366870579fc09d70
parent568689b169d8b0ae2cc252b88602db5e5acaa604 (diff)
parent574aed902443d41581684dc8bc5ddd2e067f4cdf (diff)
downloadframeworks_av-9dad026b7c69add31e1cab48774223236efe801e.zip
frameworks_av-9dad026b7c69add31e1cab48774223236efe801e.tar.gz
frameworks_av-9dad026b7c69add31e1cab48774223236efe801e.tar.bz2
am 574aed90: Merge "When aggregating buffers, make sure we don\'t lose data" into lmp-mr1-dev
* commit '574aed902443d41581684dc8bc5ddd2e067f4cdf': When aggregating buffers, make sure we don't lose data
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
index dbc0441..c01f16a 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -1345,6 +1345,12 @@ status_t NuPlayer::feedDecoderInputData(bool audio, const sp<AMessage> &msg) {
// This stream is unaffected by the discontinuity
return -EWOULDBLOCK;
}
+ } else if (err == ERROR_END_OF_STREAM
+ && doBufferAggregation && (mAggregateBuffer != NULL)) {
+ // send out the last bit of aggregated data
+ reply->setBuffer("buffer", mAggregateBuffer);
+ mAggregateBuffer.clear();
+ err = OK;
}
reply->setInt32("err", err);