summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorWei Jia <wjia@google.com>2014-08-07 06:11:39 +0000
committerThe Android Automerger <android-build@android.com>2014-08-07 11:50:28 -0700
commitb189a5b37cd1768f996096122b9541d9fa29ec43 (patch)
treef4bee06f2f2782649482cb6515e0b2ef0e589f7b /media
parentef28532ffcc5bef44301f0c63d5abf3c2feb4921 (diff)
downloadframeworks_av-b189a5b37cd1768f996096122b9541d9fa29ec43.zip
frameworks_av-b189a5b37cd1768f996096122b9541d9fa29ec43.tar.gz
frameworks_av-b189a5b37cd1768f996096122b9541d9fa29ec43.tar.bz2
Revert "NuPlayer: don't feed decoder input data during flushing."
The previous patch results in MediaBuffer leakage. This reverts commit 69a85b792c31033a99c8858e3b1a3c2ea68b6278. Bug: 14955925 Bug: 16303659 Bug: 16467066 Bug: 16849601 Change-Id: Ib1892b7603a97e12b7ee228fd5a4009700cdc988
Diffstat (limited to 'media')
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
index d56b1f0..ba6fb7d 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -1198,11 +1198,11 @@ status_t NuPlayer::feedDecoderInputData(bool audio, const sp<AMessage> &msg) {
sp<AMessage> reply;
CHECK(msg->findMessage("reply", &reply));
- if ((audio && mFlushingAudio != NONE
- && mFlushingAudio != AWAITING_DISCONTINUITY)
- || (!audio && mFlushingVideo != NONE
- && mFlushingVideo != AWAITING_DISCONTINUITY)) {
- return -EWOULDBLOCK;
+ if ((audio && IsFlushingState(mFlushingAudio))
+ || (!audio && IsFlushingState(mFlushingVideo))) {
+ reply->setInt32("err", INFO_DISCONTINUITY);
+ reply->post();
+ return OK;
}
sp<ABuffer> accessUnit;