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

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

Merge "Fix bugs regarding clamping of numFrames variable." am: f4935e88 am: 716f64f5

am: e0aad0c9

Change-Id: Icc90f9b1e561d4b3db61730509d65b0a8b0cc0f2
parents 8c27636d e0aad0c9
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1148,8 +1148,7 @@ int64_t NuPlayer2::Renderer::getDurationUsIfPlayedAtSampleRate(uint32_t numFrame
        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).