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

Commit 3589cd71 authored by Wonsik Kim's avatar Wonsik Kim
Browse files

CCodec: clear buffer metadata properly in array mode

Test: setprop debug.stagefright.ccodec yes
Test: stagefright -S -N c2.google.avc.decoder /sdcard/a.mp4
Bug: 72631227
Change-Id: I840c080e715f3a91da65aefa388641ad76645f03
parent 3923b1b7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -312,6 +312,7 @@ public:
                mBufferArray[i].available = false;
                *index = i;
                *buffer = mBufferArray[i].clientBuffer;
                (*buffer)->meta()->clear();
                (*buffer)->setRange(0, (*buffer)->capacity());
                return true;
            }
@@ -487,6 +488,7 @@ public:
                *index = i;
                *codecBuffer = mBufferArray[i].clientBuffer;
                (*codecBuffer)->setFormat(mFormat);
                (*codecBuffer)->meta()->clear();
                mBufferArray[i].compBuffer = buffer;
                mBufferArray[i].available = false;
                return true;
@@ -512,6 +514,7 @@ public:
                *index = i;
                *codecBuffer = mBufferArray[i].clientBuffer;
                (*codecBuffer)->setFormat(mFormat);
                (*codecBuffer)->meta()->clear();
                mBufferArray[i].available = false;
                return true;
            }