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

Commit cce59b2c authored by Arun Johnson's avatar Arun Johnson
Browse files

Reset mBufferInfos for setBufferInfo(s)

Since any of the setBufferInfo(s) can be converted
to BufferInfos in getBufferInfos, a reset is required
for mBufferInfos for every setBufferInfo(s)

Bug: 325512893
Test: atest android.mediav2.cts.CodecDecoderBlockModelMultiAccessUnitTest

Change-Id: Ibf28ad0983985bfb93f3bffe426677729430d06a
parent bc05bdbb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4748,6 +4748,9 @@ final public class MediaCodec {
        }

        void setBufferInfo(MediaCodec.BufferInfo info) {
            // since any of setBufferInfo(s) should translate to getBufferInfos,
            // mBufferInfos needs to be reset for every setBufferInfo(s)
            mBufferInfos.clear();
            mPresentationTimeUs = info.presentationTimeUs;
            mFlags = info.flags;
        }