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

Commit 83af7a3c 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

am: 48fe519d

Change-Id: I34b848bb342d779a2213524998fc48b400b62d41
parents bf7927a0 48fe519d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -280,8 +280,8 @@ media_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
@@ -71,7 +71,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
@@ -376,7 +376,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;
        }
    }
@@ -388,7 +388,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)