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

Skip to content
Commit 3a66c4e0 authored by anjunwen's avatar anjunwen Committed by Cherrypicker Worker
Browse files

C2SoftAacEnc: Clear encoder internal buffer during flush

During flush call, in some cases, encoders internal buffer
may not be cleared and that leads to an error returned
from the encoder library. This leads to OOB access of
mRemainder buffer.
To fix this, plugin clears encoders internal buffer during
flush.

Also, in case of error during encode call, consume all the
input bytes to prevent OOB access of mRemainder buffer.

bug: 264226775
Test: atest CtsMediaV2TestCases
Test: atest VtsHalMediaC2V1_0TargetAudioEncTest
(cherry picked from https://partner-android-review.googlesource.com/q/commit:7da97785c567f9405811451c8b05da6a9f316646)
Merged-In: I197781c8490e1de2217a2aa019ac780c7873f6d5
Change-Id: I197781c8490e1de2217a2aa019ac780c7873f6d5
parent af8be3f5
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