Commit 5047a5a4 by andrewlewis Committed by Oliver Woodman

Fix pre-L codec buffer initialization

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=203341457
parent acbe52d0
......@@ -729,7 +729,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
codec.start();
TraceUtil.endSection();
codecInitializedTimestamp = SystemClock.elapsedRealtime();
getCodecBuffers();
getCodecBuffers(codec);
} catch (Exception e) {
if (codec != null) {
resetCodecBuffers();
......@@ -743,7 +743,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
onCodecInitialized(name, codecInitializedTimestamp, elapsed);
}
private void getCodecBuffers() {
private void getCodecBuffers(MediaCodec codec) {
if (Util.SDK_INT < 21) {
inputBuffers = codec.getInputBuffers();
outputBuffers = codec.getOutputBuffers();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment