Merge "Revert "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 d56b1f0..ba6fb7d 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -1198,11 +1198,11 @@
     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;