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

Commit a03a615a authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [10864213, 10864911] into rvc-release

Change-Id: Ia4dda58f0f1715f0442c580ffa26653f3203515d
parents aab43443 20fee56e
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -1260,7 +1260,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
                         */
                        mLastTrack->elst_initial_empty_edit_ticks = segment_duration;
                    } else if (media_time >= 0 && i == 0) {
                        ALOGV("first edit list entry");
                        ALOGV("first edit list entry - from gapless playback files");
                        mLastTrack->elst_media_time = media_time;
                        mLastTrack->elst_segment_duration = segment_duration;
                        ALOGV("segment_duration: %" PRIu64 " media_time: %" PRId64,
@@ -1270,10 +1270,6 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
                    } else if (empty_edit_present && i == 1) {
                        // Process second entry only when the first entry was an empty edit entry.
                        ALOGV("second edit list entry");
                        mLastTrack->elst_media_time = media_time;
                        mLastTrack->elst_segment_duration = segment_duration;
                        ALOGV("segment_duration: %" PRIu64 " media_time: %" PRId64,
                              segment_duration, media_time);
                        mLastTrack->elst_shift_start_ticks = media_time;
                    } else {
                        ALOGW("for now, unsupported entry in edit list %" PRIu32, entry_count);
@@ -5863,7 +5859,7 @@ media_status_t MPEG4Source::read(
    ReadOptions::SeekMode mode;

    if (options && options->getSeekTo(&seekTimeUs, &mode)) {

        ALOGV("seekTimeUs:%" PRId64, seekTimeUs);
        if (mIsHeif) {
            CHECK(mSampleTable == NULL);
            CHECK(mItemTable != NULL);
@@ -6296,6 +6292,7 @@ media_status_t MPEG4Source::fragmentedRead(
    int64_t seekTimeUs;
    ReadOptions::SeekMode mode;
    if (options && options->getSeekTo(&seekTimeUs, &mode)) {
        ALOGV("seekTimeUs:%" PRId64, seekTimeUs);
        int64_t elstInitialEmptyEditUs = 0, elstShiftStartUs = 0;
        if (mElstInitialEmptyEditTicks > 0) {
            elstInitialEmptyEditUs = ((long double)mElstInitialEmptyEditTicks * 1000000) /