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

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

Merge "Fix bugs regarding clamping of numFrames variable." am: 615d9ff5 am: 23a9678b

am: e9ab588c

Change-Id: Ieeafefed7f324a68917848e54451693d0bedd019
parents 8d7fea64 e9ab588c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1161,8 +1161,8 @@ int64_t NuPlayer::Renderer::getDurationUsIfPlayedAtSampleRate(uint32_t numFrames
        ALOGE("sampleRate is 0 in %s mode", offloadingAudio() ? "offload" : "non-offload");
        return 0;
    }
    // TODO: remove the (int32_t) casting below as it may overflow at 12.4 hours.
    return (int64_t)((int32_t)numFrames * 1000000LL / sampleRate);

    return (int64_t)(numFrames * 1000000LL / sampleRate);
}

// Calculate duration of pending samples if played at normal rate (i.e., 1.0).