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

Skip to content
Commit b9b8d14d authored by hovanchen's avatar hovanchen Committed by Cheng-Hao Chen
Browse files

Prevent Media Server crash while the AwesomePlayer getBitrate return true with...

Prevent Media Server crash while the AwesomePlayer getBitrate return true with mBitrate equals to zero.

[Cause]
   - getBitrate(int64_t *bitrate) will return true if mBitrate = 0.
   - Then, in getCachedDuration_l(int64_t *durationUs, bool *eos), 
     we might execute the following function when 
     getBitrate(&bitrate) = true and bitrate = 0.
        *durationUs = cachedDataRemaining * 8000000ll / bitrate;
   - Mediaserver will be crashed when divided by zero.
   - The mediaserver crash often occur when DLNA IOP tests on Golden DMS
     with AAC_ADTS_320 audio.
[Solution]
   - Prevent the divide function executing when bitrate is zero.

Change-Id: I4439d92cee5faec95df2109e9186c33b3fff6c66
parent a9aa6baa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment