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

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

am f526f687: am a07ad890: am 776bfd80: am 8a55bcb6: resolved conflicts for...

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

* commit 'f526f687':
  Sanity check padding/delay values for gapless playback
parents f8f0e0b7 f526f687
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;