Merge "Revert "MediaCodec: don't cache buffers until requested"" into tm-dev am: 84959301fb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18894226 Change-Id: I61b1e17bb4d897ed09dbf26398a7ad8dc91766f5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -2320,6 +2320,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();
|
||||
|
||||
@@ -3950,9 +3954,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();
|
||||
}
|
||||
@@ -3991,9 +3992,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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user