diff options
author | Robert Shih <robertshih@google.com> | 2015-03-06 00:42:39 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-03-06 00:42:39 +0000 |
commit | c10e7f121d346b433c32d1c0d791c4b547cbe60e (patch) | |
tree | 2edbb48c0eafa968049c75c864bebb6684e35cf9 /media/libmediaplayerservice | |
parent | 1a86a8adbf4ab43a6aed2c3c8aa0830c001adb77 (diff) | |
parent | 62ca0231787d5fe23ee95c482d15b8434add2427 (diff) | |
download | frameworks_av-c10e7f121d346b433c32d1c0d791c4b547cbe60e.zip frameworks_av-c10e7f121d346b433c32d1c0d791c4b547cbe60e.tar.gz frameworks_av-c10e7f121d346b433c32d1c0d791c4b547cbe60e.tar.bz2 |
Merge "Revert "Fix NuPlayer::Decoder input buffer loss upon seamless format change""
Diffstat (limited to 'media/libmediaplayerservice')
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp index 33378db..5d98d98 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp @@ -602,11 +602,11 @@ status_t NuPlayer::Decoder::fetchInputData(sp<AMessage> &reply) { // output queue, and handles it in renderer instead. rememberCodecSpecificData(newFormat); onFlush(false /* notifyComplete */); - continue; + err = OK; } else if (seamlessFormatChange) { // reuse existing decoder and don't flush rememberCodecSpecificData(newFormat); - continue; + err = OK; } else { // This stream is unaffected by the discontinuity return -EWOULDBLOCK; @@ -696,7 +696,10 @@ bool NuPlayer::Decoder::onInputBufferFetched(const sp<AMessage> &msg) { int32_t streamErr = ERROR_END_OF_STREAM; CHECK(msg->findInt32("err", &streamErr) || !hasBuffer); - CHECK(streamErr != OK); + if (streamErr == OK) { + /* buffers are returned to hold on to */ + return true; + } // attempt to queue EOS status_t err = mCodec->queueInputBuffer( |