mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Fix incorrect condition.
This commit is contained in:
parent
1c92b28b16
commit
be721943c6
1 changed files with 23 additions and 23 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue