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

Commit bd903e36 authored by Lajos Molnar's avatar Lajos Molnar Committed by Android (Google) Code Review
Browse files

Merge "stagefright: LiveSession: delay consuming reply ID for seek"

parents 9db4d29f a1151185
Loading
Loading
Loading
Loading
+9 −16
Original line number Diff line number Diff line
@@ -498,16 +498,15 @@ void LiveSession::onMessageReceived(const sp<AMessage> &msg) {

        case kWhatSeek:
        {
            sp<AReplyToken> seekReplyID;
            CHECK(msg->senderAwaitsResponse(&seekReplyID));
            mSeekReplyID = seekReplyID;
            mSeekReply = new AMessage;

            status_t err = onSeek(msg);

            if (err != OK) {
            if (mReconfigurationInProgress) {
                msg->post(50000);
                break;
            }

            CHECK(msg->senderAwaitsResponse(&mSeekReplyID));
            mSeekReply = new AMessage;

            onSeek(msg);
            break;
        }

@@ -1372,16 +1371,10 @@ HLSTime LiveSession::latestMediaSegmentStartTime() const {
    return audioTime < videoTime ? videoTime : audioTime;
}

status_t LiveSession::onSeek(const sp<AMessage> &msg) {
void LiveSession::onSeek(const sp<AMessage> &msg) {
    int64_t timeUs;
    CHECK(msg->findInt64("timeUs", &timeUs));

    if (!mReconfigurationInProgress) {
    changeConfiguration(timeUs);
        return OK;
    } else {
        return -EWOULDBLOCK;
    }
}

status_t LiveSession::getDuration(int64_t *durationUs) const {
+1 −1
Original line number Diff line number Diff line
@@ -237,7 +237,7 @@ private:
    sp<PlaylistFetcher> addFetcher(const char *uri);

    void onConnect(const sp<AMessage> &msg);
    status_t onSeek(const sp<AMessage> &msg);
    void onSeek(const sp<AMessage> &msg);
    void onFinishDisconnect2();

    // If given a non-zero block_size (default 0), it is used to cap the number of