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

Commit 17cb0490 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 am: 7a33c062 am: f0eb48c8 am: 64cb47ee
am: 54355d98

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

Change-Id: If0135d9ba79df9e71803f34a3c80da03f723d655
parents f3aaf48f 54355d98
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(
@@ -333,7 +334,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;
    }

@@ -372,6 +373,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;