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

Commit 5e9c3de5 authored by Andreas Huber's avatar Andreas Huber Committed by Android (Google) Code Review
Browse files

Merge "Fix a webm-seek issue introduced when adding support for streaming webm"

parents 09bc5f5b 21796929
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -291,6 +291,7 @@ void BlockIterator::reset() {
    Mutex::Autolock autoLock(mExtractor->mLock);

    mCluster = mExtractor->mSegment->GetFirst();
    mBlockEntry = NULL;
    mBlockEntryIndex = 0;

    do {
@@ -302,11 +303,13 @@ void BlockIterator::seek(int64_t seekTimeUs) {
    Mutex::Autolock autoLock(mExtractor->mLock);

    mCluster = mExtractor->mSegment->FindCluster(seekTimeUs * 1000ll);
    mBlockEntry = NULL;
    mBlockEntryIndex = 0;

    while (!eos() && block()->GetTrackNumber() != mTrackNum) {
    do {
        advance_l();
    }
    while (!eos() && block()->GetTrackNumber() != mTrackNum);

    while (!eos() && !mBlockEntry->GetBlock()->IsKey()) {
        advance_l();