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

Commit e77a32bd authored by Roger1 Jonsson's avatar Roger1 Jonsson Committed by android-build-merger
Browse files

Avoid crash for stss sync sample number 0

am: 5c364997

Change-Id: Ia97daf543c65b52db1c5d09471ed8d00a434364d
parents 761abda1 5c364997
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -555,6 +555,10 @@ status_t SampleTable::setSyncSampleParams(off64_t data_offset, size_t data_size)
    }

    for (size_t i = 0; i < mNumSyncSamples; ++i) {
        if (mSyncSamples[i] == 0) {
            ALOGE("b/32423862, unexpected zero value in stss");
            continue;
        }
        mSyncSamples[i] = ntohl(mSyncSamples[i]) - 1;
    }