mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-20 11:33:06 +00:00
Render the latest frame available at the time
This commit is contained in:
parent
839540dc74
commit
c537af2273
@ -133,8 +133,18 @@ public class MediaCodecDecoderRenderer implements VideoDecoderRenderer {
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (outIndex >= 0) {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user