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

Commit 9be65cb0 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

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

Change-Id: I0b35a0333028928fe892b306b680c3c1a7469bb1
parents ad599498 59f9cc2a
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;