Merge "NuPlayer: don't feed decoder input data during flushing." into lmp-dev
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
index 0a59b2e..17038a4 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -1180,11 +1180,11 @@
sp<AMessage> reply;
CHECK(msg->findMessage("reply", &reply));
- if ((audio && IsFlushingState(mFlushingAudio))
- || (!audio && IsFlushingState(mFlushingVideo))) {
- reply->setInt32("err", INFO_DISCONTINUITY);
- reply->post();
- return OK;
+ if ((audio && mFlushingAudio != NONE
+ && mFlushingAudio != AWAITING_DISCONTINUITY)
+ || (!audio && mFlushingVideo != NONE
+ && mFlushingVideo != AWAITING_DISCONTINUITY)) {
+ return -EWOULDBLOCK;
}
sp<ABuffer> accessUnit;