Park for a bit if there's nothing to do

This commit is contained in:
Cameron Gutman
2014-07-19 03:49:44 -07:00
parent 92143df65c
commit f5ec665115
2 changed files with 6 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ package com.limelight.binding.video;
import java.nio.ByteBuffer;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.locks.LockSupport;
import com.limelight.LimeLog;
import com.limelight.nvstream.av.ByteBufferDescriptor;
@@ -203,6 +204,9 @@ public class MediaCodecDecoderRenderer implements VideoDecoderRenderer {
}
} else {
switch (outIndex) {
case MediaCodec.INFO_TRY_AGAIN_LATER:
LockSupport.parkNanos(1);
break;
case MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED:
LimeLog.info("Output buffers changed");
break;