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

Commit 48fe519d authored by Chih-hung Hsieh's avatar Chih-hung Hsieh Committed by android-build-merger
Browse files

Merge "Fix cert-dcl16-c clang-tidy warnings in media/extractors." am: cd4c042f

am: dc3102d3

Change-Id: I1f69637b8413e4d5ccb96cda4335fc20c6438820
parents 4c2255fb dc3102d3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -285,8 +285,8 @@ status_t AMRSource::read(
    ReadOptions::SeekMode mode;
    if (mOffsetTableLength > 0 && options && options->getSeekTo(&seekTimeUs, &mode)) {
        size_t size;
        int64_t seekFrame = seekTimeUs / 20000ll;  // 20ms per frame.
        mCurrentTimeUs = seekFrame * 20000ll;
        int64_t seekFrame = seekTimeUs / 20000LL;  // 20ms per frame.
        mCurrentTimeUs = seekFrame * 20000LL;

        size_t index = seekFrame < 0 ? 0 : seekFrame / 50;
        if (index >= mOffsetTableLength) {
+1 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ VBRISeeker *VBRISeeker::CreateFromSource(
    size_t numFrames = U32_AT(&vbriHeader[14]);

    int64_t durationUs =
        numFrames * 1000000ll * (sampleRate >= 32000 ? 1152 : 576) / sampleRate;
        numFrames * 1000000LL * (sampleRate >= 32000 ? 1152 : 576) / sampleRate;

    ALOGV("duration = %.2f secs", durationUs / 1E6);

+2 −2
Original line number Diff line number Diff line
@@ -262,7 +262,7 @@ void MPEG2TSExtractor::init() {
        }

        // Wait only for 2 seconds to detect audio/video streams.
        if (ALooper::GetNowUs() - startTime > 2000000ll) {
        if (ALooper::GetNowUs() - startTime > 2000000LL) {
            break;
        }
    }
@@ -274,7 +274,7 @@ void MPEG2TSExtractor::init() {
        List<int64_t> durations;
        // Estimate duration --- stabilize until you get <500ms deviation.
        while (feedMore() == OK
                && ALooper::GetNowUs() - startTime <= 2000000ll) {
                && ALooper::GetNowUs() - startTime <= 2000000LL) {
            if (mSeekSyncPoints->size() > prevSyncSize) {
                prevSyncSize = mSeekSyncPoints->size();
                int64_t diffUs = mSeekSyncPoints->keyAt(prevSyncSize - 1)