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

Commit 7a33c062 authored by Pawin Vongmasa's avatar Pawin Vongmasa Committed by android-build-merger
Browse files

SampleTable.cpp: Fixed a regression caused by a fix for bug 28076789. am:...

SampleTable.cpp: Fixed a regression caused by a fix for bug 28076789. am: 70dec4dc am: a1e309be am: 63e9b573 am: ef217380 am: 59f9cc2a am: 9be65cb0
am: 9b449c48

* commit '9b449c48':
  SampleTable.cpp: Fixed a regression caused by a fix for bug 28076789.

Change-Id: I6c2a13f8844d2405da3ef14ac8f960734419fd07
parents 3b1a4359 9b449c48
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -121,6 +121,7 @@ SampleTable::SampleTable(const sp<DataSource> &source)
      mSampleSizeFieldSize(0),
      mDefaultSampleSize(0),
      mNumSampleSizes(0),
      mHasTimeToSample(false),
      mTimeToSampleCount(0),
      mTimeToSample(),
      mSampleTimeEntries(NULL),
@@ -159,7 +160,7 @@ bool SampleTable::isValid() const {
    return mChunkOffsetOffset >= 0
        && mSampleToChunkOffset >= 0
        && mSampleSizeOffset >= 0
        && !mTimeToSample.empty();
        && mHasTimeToSample;
}

status_t SampleTable::setChunkOffsetParams(
@@ -325,7 +326,7 @@ status_t SampleTable::setSampleSizeParams(

status_t SampleTable::setTimeToSampleParams(
        off64_t data_offset, size_t data_size) {
    if (!mTimeToSample.empty() || data_size < 8) {
    if (mHasTimeToSample || data_size < 8) {
        return ERROR_MALFORMED;
    }

@@ -364,6 +365,8 @@ status_t SampleTable::setTimeToSampleParams(
    for (size_t i = 0; i < mTimeToSample.size(); ++i) {
        mTimeToSample.editItemAt(i) = ntohl(mTimeToSample[i]);
    }

    mHasTimeToSample = true;
    return OK;
}

+1 −0
Original line number Diff line number Diff line
@@ -111,6 +111,7 @@ private:
    uint32_t mDefaultSampleSize;
    uint32_t mNumSampleSizes;

    bool mHasTimeToSample;
    uint32_t mTimeToSampleCount;
    Vector<uint32_t> mTimeToSample;