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

Commit 06197925 authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru Committed by Android Git Automerger
Browse files

am 267363ee: Merge "Prevent Media Server crash while the AwesomePlayer...

am 267363ee: Merge "Prevent Media Server crash while the AwesomePlayer getBitrate return true with mBitrate equals to zero."

* commit '267363ee':
  Prevent Media Server crash while the AwesomePlayer getBitrate return true with mBitrate equals to zero.
parents 7266bc80 267363ee
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -617,7 +617,7 @@ bool AwesomePlayer::getBitrate(int64_t *bitrate) {
bool AwesomePlayer::getCachedDuration_l(int64_t *durationUs, bool *eos) {
    int64_t bitrate;

    if (mCachedSource != NULL && getBitrate(&bitrate)) {
    if (mCachedSource != NULL && getBitrate(&bitrate) && (bitrate > 0)) {
        status_t finalStatus;
        size_t cachedDataRemaining = mCachedSource->approxDataRemaining(&finalStatus);
        *durationUs = cachedDataRemaining * 8000000ll / bitrate;