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

Commit 4a3b0345 authored by Haripriya Deshmukh's avatar Haripriya Deshmukh Committed by Ram Mohan M
Browse files

C2SoftOpusEnc: fix misplaced output timestamp computation

During a process call, at the start of the loop, the current frame pts
is computed. At the end of the loop, if there are no more samples to be
processed, then the work item is filled and returned. If there are more
samples to be processed, this timestamp is marked as previous output pts
and used during cloneAndSend() and the current output pts is updated.
The problem occurs, if there are more samples to be processed but not
enough to generate an output. In this case output pts need not be
updated. The previously generated timestamp should be used to signal the
output and mark the work item as done. This is addressed by deferring
the output pts computation only when an output is generated.

Minor code cleanup.

Bug: 412479079
Bug: 139484367
Test: atest MctsMediaV2TestCases -- --module-arg \
 MctsMediaV2TestCases:instrumentation-arg:media-type-sel:=opus
Test: atest MctsMediaEncoderTestCases -- --module-arg \
 MctsMediaEncoderTestCases:instrumentation-arg:media-type-prefix:=audio/opus
Test: atest VtsHalMediaC2V1_0TargetAudioEncTest
Flag: EXEMPT bugfix

Change-Id: I42162b42587927aed727da6a9eb790835105d221
parent 35795148
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment