Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee6705ad authored by Chong Zhang's avatar Chong Zhang Committed by android-build-merger
Browse files

stagefright: send EOS to encoder for thumbnail extraction

am: d62d3077

Change-Id: I3d327311145b2b557efff35b3a2527f484e47f89
parents d2156320 d62d3077
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -301,10 +301,13 @@ status_t FrameDecoder::extractInternal() {
            err = mSource->read(&mediaBuffer, &mReadOptions);
            mReadOptions.clearSeekTo();
            if (err != OK) {
                ALOGW("Input Error or EOS");
                mHaveMoreInputs = false;
                if (!mFirstSample && err == ERROR_END_OF_STREAM) {
                    (void)mDecoder->queueInputBuffer(
                            index, 0, 0, 0, MediaCodec::BUFFER_FLAG_EOS);
                    err = OK;
                } else {
                    ALOGW("Input Error: err=%d", err);
                }
                break;
            }