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

Commit bc7d1172 authored by Wonsik Kim's avatar Wonsik Kim
Browse files

Revert "MediaCodec: don't cache buffers until requested"

This reverts commit d59a075f.

Reason for revert: regression (see b/235925715)
Fixes: 235925715
Bug: 189889230
Test: manual

Change-Id: I2e52c3abdd13fa0547a510b3599e082e3bff0989
parent d59a075f
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -2317,6 +2317,10 @@ final public class MediaCodec {
     */
    public final void start() {
        native_start();
        synchronized(mBufferLock) {
            cacheBuffers(true /* input */);
            cacheBuffers(false /* input */);
        }
    }
    private native final void native_start();

@@ -3947,9 +3951,6 @@ final public class MediaCodec {
                        + "Please obtain MediaCodec.LinearBlock or HardwareBuffer "
                        + "objects and attach to QueueRequest objects.");
            }
            if (mCachedInputBuffers == null) {
                cacheBuffers(true /* input */);
            }
            if (mCachedInputBuffers == null) {
                throw new IllegalStateException();
            }
@@ -3988,9 +3989,6 @@ final public class MediaCodec {
                        + "is not compatible with CONFIGURE_FLAG_USE_BLOCK_MODEL. "
                        + "Please use getOutputFrame to get output frames.");
            }
            if (mCachedOutputBuffers == null) {
                cacheBuffers(false /* input */);
            }
            if (mCachedOutputBuffers == null) {
                throw new IllegalStateException();
            }