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

Commit ef217380 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: 70dec4dc am: a1e309be

am: 63e9b573

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

Change-Id: Idcf74c810152b7160cf99aa25fe664c6b40f0750
parents cbc0d3ac 63e9b573
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(
@@ -323,7 +324,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;
    }

@@ -362,6 +363,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;