Commit be721943 by Oliver Woodman

Fix incorrect condition.

parent 1c92b28b
......@@ -375,14 +375,16 @@ public class MediaCodecVideoTrackRenderer extends MediaCodecTrackRenderer {
return true;
}
if (getState() == TrackRenderer.STATE_STARTED && earlyUs < 30000) {
if (getState() != TrackRenderer.STATE_STARTED) {
return false;
}
if (Util.SDK_INT >= 21) {
// Let the underlying framework time the release.
if (earlyUs < 50000) {
renderOutputBufferTimedV21(codec, bufferIndex, System.nanoTime() + (earlyUs * 1000L));
return true;
}
return false;
} else {
// We need to time the release ourselves.
if (earlyUs < 30000) {
......@@ -399,8 +401,6 @@ public class MediaCodecVideoTrackRenderer extends MediaCodecTrackRenderer {
renderOutputBufferImmediate(codec, bufferIndex);
return true;
}
return false;
}
}
// We're either not playing, or it's not time to render the frame yet.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment