diff options
author | Wei Jia <wjia@google.com> | 2014-08-05 21:53:08 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-08-05 00:34:22 +0000 |
commit | e46711343b43786c049a007369a72c1c78e6c5db (patch) | |
tree | dc3e0d4fd6c340fd482faa7008e91067a4af2d3d /media/libmediaplayerservice/nuplayer/NuPlayer.cpp | |
parent | b15486f973f80063ae2d436f7d71667b592c6fc9 (diff) | |
parent | 69a85b792c31033a99c8858e3b1a3c2ea68b6278 (diff) | |
download | frameworks_av-e46711343b43786c049a007369a72c1c78e6c5db.zip frameworks_av-e46711343b43786c049a007369a72c1c78e6c5db.tar.gz frameworks_av-e46711343b43786c049a007369a72c1c78e6c5db.tar.bz2 |
Merge "NuPlayer: don't feed decoder input data during flushing." into lmp-dev
Diffstat (limited to 'media/libmediaplayerservice/nuplayer/NuPlayer.cpp')
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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 @@ 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; |