mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-04-15 14:48:57 +00:00
Always use the new L+ releaseOutputBuffer() to gain drop support on L
This commit is contained in:
@@ -405,10 +405,17 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Render the last buffer
|
// Render the last buffer
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && !legacyFrameDropRendering) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
// Use a PTS that will cause this frame to never be dropped if frame dropping
|
if (legacyFrameDropRendering) {
|
||||||
// is disabled
|
// Use a PTS that will cause this frame to be dropped if another comes in within
|
||||||
videoDecoder.releaseOutputBuffer(lastIndex, 0);
|
// the same V-sync period
|
||||||
|
videoDecoder.releaseOutputBuffer(lastIndex, System.nanoTime());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Use a PTS that will cause this frame to never be dropped if frame dropping
|
||||||
|
// is disabled
|
||||||
|
videoDecoder.releaseOutputBuffer(lastIndex, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
videoDecoder.releaseOutputBuffer(lastIndex, true);
|
videoDecoder.releaseOutputBuffer(lastIndex, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user