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

Commit e2ca7517 authored by Wei Jia's avatar Wei Jia Committed by android-build-merger
Browse files

DO NOT MERGE MPEG4Extractor: ensure kKeyTrackID exists before creating an MPEG4Source as track.

am: b016207f

* commit 'b016207f':
  DO NOT MERGE MPEG4Extractor: ensure kKeyTrackID exists before creating an MPEG4Source as track.

Change-Id: I81cdae1a917cfcd712e800cf3edfd168b1c89c32
parents 38ab87c3 b016207f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -883,6 +883,11 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
            }

            if (isTrack) {
                int32_t trackId;
                // There must be exact one track header per track.
                if (!mLastTrack->meta->findInt32(kKeyTrackID, &trackId)) {
                    mLastTrack->skipTrack = true;
                }
                if (mLastTrack->skipTrack) {
                    Track *cur = mFirstTrack;

+5 −0
Original line number Diff line number Diff line
@@ -84,6 +84,11 @@ status_t SampleIterator::seekTo(uint32_t sampleIndex) {

    CHECK(sampleIndex < mStopChunkSampleIndex);

    if (mSamplesPerChunk == 0) {
        ALOGE("b/22802344");
        return ERROR_MALFORMED;
    }

    uint32_t chunk =
        (sampleIndex - mFirstChunkSampleIndex) / mSamplesPerChunk
        + mFirstChunk;