mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-04-23 08:46:40 +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:
@@ -121,7 +121,8 @@ public class MediaCodecDecoderRenderer implements VideoDecoderRenderer {
|
|||||||
BufferInfo info = new BufferInfo();
|
BufferInfo info = new BufferInfo();
|
||||||
while (!isInterrupted())
|
while (!isInterrupted())
|
||||||
{
|
{
|
||||||
int outIndex = videoDecoder.dequeueOutputBuffer(info, 100);
|
// Block for a maximum of 100 ms
|
||||||
|
int outIndex = videoDecoder.dequeueOutputBuffer(info, 100000);
|
||||||
switch (outIndex) {
|
switch (outIndex) {
|
||||||
case MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED:
|
case MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED:
|
||||||
System.out.println("Output buffers changed");
|
System.out.println("Output buffers changed");
|
||||||
|
|||||||
Reference in New Issue
Block a user