mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 19:13:03 +00:00
Block for 100 ms instead of 100 us waiting for a frame. This reduces the CPU time wasted by useless iterations of the rendering loop.
This commit is contained in:
parent
c537af2273
commit
6fc848ef56
@ -121,7 +121,8 @@ public class MediaCodecDecoderRenderer implements VideoDecoderRenderer {
|
||||
BufferInfo info = new BufferInfo();
|
||||
while (!isInterrupted())
|
||||
{
|
||||
int outIndex = videoDecoder.dequeueOutputBuffer(info, 100);
|
||||
// Block for a maximum of 100 ms
|
||||
int outIndex = videoDecoder.dequeueOutputBuffer(info, 100000);
|
||||
switch (outIndex) {
|
||||
case MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED:
|
||||
System.out.println("Output buffers changed");
|
||||
|
Loading…
x
Reference in New Issue
Block a user