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

Commit 2ba7ce92 authored by Andreas Huber's avatar Andreas Huber
Browse files

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

Change-Id: I52ec841832077603ee035f7a648316349513e978
related-to-bug: 4199894
parent b7006fcd
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();