• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

frameworks/av


Commit MetaInfo

Revisione3032ea219db3a818c900cef35ce1e2db75cc334 (tree)
Time2019-10-30 05:03:14
AuthorTreeHugger Robot <treehugger-gerrit@goog...>
CommiterAndroid (Google) Code Review

Log Message

Merge "aacenc: fix possible shift in remainder" into qt-qpr1-dev

Change Summary

Incremental Difference

--- a/media/codec2/components/aac/C2SoftAacEnc.cpp
+++ b/media/codec2/components/aac/C2SoftAacEnc.cpp
@@ -521,16 +521,14 @@ void C2SoftAacEnc::process(
521521 mInputSize += outargs.numInSamples * sizeof(int16_t);
522522 }
523523
524- if (outargs.numInSamples > 0) {
525- inBuffer[0] = (int16_t *)inBuffer[0] + outargs.numInSamples;
526- inBufferSize[0] -= outargs.numInSamples * sizeof(int16_t);
527- inargs.numInSamples -= outargs.numInSamples;
528- }
529-
530524 if (inBuffer[0] == mRemainder) {
531525 inBuffer[0] = const_cast<uint8_t *>(data);
532526 inBufferSize[0] = capacity;
533527 inargs.numInSamples = capacity / sizeof(int16_t);
528+ } else if (outargs.numInSamples > 0) {
529+ inBuffer[0] = (int16_t *)inBuffer[0] + outargs.numInSamples;
530+ inBufferSize[0] -= outargs.numInSamples * sizeof(int16_t);
531+ inargs.numInSamples -= outargs.numInSamples;
534532 }
535533 }
536534 ALOGV("encoderErr = %d mInputSize = %zu "