mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-02-16 18:40:46 +00:00
Render the latest frame available at the time
This commit is contained in:
@@ -133,8 +133,18 @@ public class MediaCodecDecoderRenderer implements VideoDecoderRenderer {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (outIndex >= 0) {
|
||||
videoDecoder.releaseOutputBuffer(outIndex, true);
|
||||
int lastIndex = outIndex;
|
||||
|
||||
// Get the last output buffer in the queue
|
||||
while ((outIndex = videoDecoder.dequeueOutputBuffer(info, 0)) >= 0) {
|
||||
videoDecoder.releaseOutputBuffer(lastIndex, false);
|
||||
lastIndex = outIndex;
|
||||
}
|
||||
|
||||
// Render that buffer
|
||||
videoDecoder.releaseOutputBuffer(lastIndex, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user