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

Commit 9dff88c4 authored by Ray Essick's avatar Ray Essick Committed by Android (Google) Code Review
Browse files

Merge "eliminate CHECK_LE in PlaylistFetcher.cpp"

parents 47227ae1 1077b7a6
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2160,7 +2160,9 @@ status_t PlaylistFetcher::extractAndQueueAccessUnits(
            return ERROR_MALFORMED;
        }

        CHECK_LE(offset + aac_frame_length, buffer->size());
        if (aac_frame_length > buffer->size() - offset) {
            return ERROR_MALFORMED;
        }

        int64_t unitTimeUs = timeUs + numSamples * 1000000LL / sampleRate;
        offset += aac_frame_length;