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

Commit f526f687 authored by Marco Nelissen's avatar Marco Nelissen Committed by Android Git Automerger
Browse files

am a07ad890: am 776bfd80: am 8a55bcb6: resolved conflicts for merge of ced2dd3c to lmp-dev

* commit 'a07ad890':
  Sanity check padding/delay values for gapless playback
parents 562be234 a07ad890
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -25,6 +25,13 @@
namespace android {

SkipCutBuffer::SkipCutBuffer(int32_t skip, int32_t cut) {

    if (skip < 0 || cut < 0 || cut > 64 * 1024) {
        ALOGW("out of range skip/cut: %d/%d, using passthrough instead", skip, cut);
        skip = 0;
        cut = 0;
    }

    mFrontPadding = mSkip = skip;
    mBackPadding = cut;
    mWriteHead = 0;