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

Commit b8133296 authored by Marco Nelissen's avatar Marco Nelissen Committed by Android (Google) Code Review
Browse files

Merge "Fully reset SkipCutBuffer state in clear()"

parents 362ebe18 a6cdabf3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ class SkipCutBuffer: public RefBase {
 private:
    void write(const char *src, size_t num);
    size_t read(char *dst, size_t num);
    int32_t mSkip;
    int32_t mFrontPadding;
    int32_t mBackPadding;
    int32_t mWriteHead;
+2 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
namespace android {

SkipCutBuffer::SkipCutBuffer(int32_t skip, int32_t cut) {
    mFrontPadding = skip;
    mFrontPadding = mSkip = skip;
    mBackPadding = cut;
    mWriteHead = 0;
    mReadHead = 0;
@@ -94,6 +94,7 @@ void SkipCutBuffer::submit(const sp<ABuffer>& buffer) {

void SkipCutBuffer::clear() {
    mWriteHead = mReadHead = 0;
    mFrontPadding = mSkip;
}

void SkipCutBuffer::write(const char *src, size_t num) {