mirror of
https://github.com/samsonjs/media.git
synced 2026-04-01 10:35:48 +00:00
Fix pre-L codec buffer initialization
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=203341457
This commit is contained in:
parent
acbe52d0d7
commit
5047a5a4da
1 changed files with 2 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue