Loading media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp +2 −2 Original line number Original line Diff line number Diff line Loading @@ -1145,8 +1145,8 @@ int64_t NuPlayer::Renderer::getDurationUsIfPlayedAtSampleRate(uint32_t numFrames ALOGE("sampleRate is 0 in %s mode", offloadingAudio() ? "offload" : "non-offload"); ALOGE("sampleRate is 0 in %s mode", offloadingAudio() ? "offload" : "non-offload"); return 0; 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). // Calculate duration of pending samples if played at normal rate (i.e., 1.0). Loading Loading
media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp +2 −2 Original line number Original line Diff line number Diff line Loading @@ -1145,8 +1145,8 @@ int64_t NuPlayer::Renderer::getDurationUsIfPlayedAtSampleRate(uint32_t numFrames ALOGE("sampleRate is 0 in %s mode", offloadingAudio() ? "offload" : "non-offload"); ALOGE("sampleRate is 0 in %s mode", offloadingAudio() ? "offload" : "non-offload"); return 0; 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). // Calculate duration of pending samples if played at normal rate (i.e., 1.0). Loading