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

Commit 8913f5f7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "CCodec: clear buffer metadata properly in array mode"

parents 4778250a 3589cd71
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -312,6 +312,7 @@ public:
                mBufferArray[i].available = false;
                mBufferArray[i].available = false;
                *index = i;
                *index = i;
                *buffer = mBufferArray[i].clientBuffer;
                *buffer = mBufferArray[i].clientBuffer;
                (*buffer)->meta()->clear();
                (*buffer)->setRange(0, (*buffer)->capacity());
                (*buffer)->setRange(0, (*buffer)->capacity());
                return true;
                return true;
            }
            }
@@ -487,6 +488,7 @@ public:
                *index = i;
                *index = i;
                *codecBuffer = mBufferArray[i].clientBuffer;
                *codecBuffer = mBufferArray[i].clientBuffer;
                (*codecBuffer)->setFormat(mFormat);
                (*codecBuffer)->setFormat(mFormat);
                (*codecBuffer)->meta()->clear();
                mBufferArray[i].compBuffer = buffer;
                mBufferArray[i].compBuffer = buffer;
                mBufferArray[i].available = false;
                mBufferArray[i].available = false;
                return true;
                return true;
@@ -512,6 +514,7 @@ public:
                *index = i;
                *index = i;
                *codecBuffer = mBufferArray[i].clientBuffer;
                *codecBuffer = mBufferArray[i].clientBuffer;
                (*codecBuffer)->setFormat(mFormat);
                (*codecBuffer)->setFormat(mFormat);
                (*codecBuffer)->meta()->clear();
                mBufferArray[i].available = false;
                mBufferArray[i].available = false;
                return true;
                return true;
            }
            }