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

Commit cb064917 authored by James Dong's avatar James Dong
Browse files

DO NOT MERGE - Consider I-Frame at zeroeth position when searching for sync frames

The current logic does not check the I-frame at zeroeth position and therefore
for the files with only 1 I-Frame at zeroeth postion does not play.

Originally authored by Braganza Sam Robertsh <sam.braganza@samsung.com>

Do not merge to master branch since we made some improvement to SampleTable.cpp in the master branch.

Change-Id: I068184dec71986f14a586f769c2af1f52b4bcf94
related-to-bug: 5711942
parent f2e12498
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -627,6 +627,14 @@ status_t SampleTable::findSyncSampleNear(

        ++left;
    }

    if (left == mNumSyncSamples) {
        if (flags == kFlagAfter) {
            LOGE("tried to find a sync frame after the last one: %d", left);
            return ERROR_OUT_OF_RANGE;
        }
    }

    if (left > 0) {
        --left;
    }