mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Remove unnecessary checkStateNotNull checks
LongArrayQueue.remove() throws a NoSuchElementException if the queue is empty. PiperOrigin-RevId: 697531458
This commit is contained in:
parent
cbb8e2f1e6
commit
2568ff73cb
1 changed files with 2 additions and 3 deletions
|
|
@ -17,7 +17,6 @@ package androidx.media3.exoplayer.video;
|
||||||
|
|
||||||
import static androidx.media3.common.util.Assertions.checkArgument;
|
import static androidx.media3.common.util.Assertions.checkArgument;
|
||||||
import static androidx.media3.common.util.Assertions.checkNotNull;
|
import static androidx.media3.common.util.Assertions.checkNotNull;
|
||||||
import static androidx.media3.common.util.Assertions.checkStateNotNull;
|
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.media3.common.C;
|
import androidx.media3.common.C;
|
||||||
|
|
@ -197,12 +196,12 @@ import androidx.media3.exoplayer.ExoPlaybackException;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dropFrame() {
|
private void dropFrame() {
|
||||||
checkStateNotNull(presentationTimestampsUs.remove());
|
presentationTimestampsUs.remove();
|
||||||
frameRenderer.dropFrame();
|
frameRenderer.dropFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void renderFrame(boolean shouldRenderImmediately) {
|
private void renderFrame(boolean shouldRenderImmediately) {
|
||||||
long presentationTimeUs = checkStateNotNull(presentationTimestampsUs.remove());
|
long presentationTimeUs = presentationTimestampsUs.remove();
|
||||||
|
|
||||||
boolean videoSizeUpdated = maybeUpdateOutputVideoSize(presentationTimeUs);
|
boolean videoSizeUpdated = maybeUpdateOutputVideoSize(presentationTimeUs);
|
||||||
if (videoSizeUpdated) {
|
if (videoSizeUpdated) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue