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

Commit 083f5af8 authored by Phani Kumar Allada's avatar Phani Kumar Allada Committed by Steve Kondik
Browse files

framework/av: Fix for frame drop in video playback

- Breaks in video playback seen in video clips having audio content
  with sampling rates less than 16kHz.
- While extrapolating real time with system time, the real time is wrongly
  caped.
- Fix this issue by limiting the extrapolated real time only when EOS
  is reached.

Change-Id: I95b6a8f7f1f1fd561c92955cf52151ae2890c9a7
CRs-Fixed: 400398
parent eb4af499
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -792,7 +792,7 @@ int64_t AudioPlayer::getRealTimeUsLocked() const {

    diffUs -= mNumFramesPlayedSysTimeUs;

    if(result + diffUs <= mPositionTimeRealUs)
    if((result + diffUs <= mPositionTimeRealUs) || (!mReachedEOS))
        return result + diffUs;
    else
        return mPositionTimeRealUs;