summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Jia <wjia@google.com>2014-08-04 18:32:43 -0700
committerWei Jia <wjia@google.com>2014-08-05 14:45:33 -0700
commit69a85b792c31033a99c8858e3b1a3c2ea68b6278 (patch)
tree94cf65c46392c04271e06cfa9e136069e3586130
parentd0fded31e473e909c018f534d3019fb5168bdcd6 (diff)
downloadframeworks_av-69a85b792c31033a99c8858e3b1a3c2ea68b6278.zip
frameworks_av-69a85b792c31033a99c8858e3b1a3c2ea68b6278.tar.gz
frameworks_av-69a85b792c31033a99c8858e3b1a3c2ea68b6278.tar.bz2
NuPlayer: don't feed decoder input data during flushing.
Bug: 14955925 Bug: 16303659 Bug: 16467066 Change-Id: I7c258b986ae711357bd7e636b79853f8f3959d32
-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 58d0138..0e015b0 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -1169,11 +1169,11 @@ status_t NuPlayer::feedDecoderInputData(bool audio, const sp<AMessage> &msg) {
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;