mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08: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
@ -17,7 +17,6 @@ package androidx.media3.exoplayer.video;
|
||||
|
||||
import static androidx.media3.common.util.Assertions.checkArgument;
|
||||
import static androidx.media3.common.util.Assertions.checkNotNull;
|
||||
import static androidx.media3.common.util.Assertions.checkStateNotNull;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.media3.common.C;
|
||||
@ -197,12 +196,12 @@ import androidx.media3.exoplayer.ExoPlaybackException;
|
||||
}
|
||||
|
||||
private void dropFrame() {
|
||||
checkStateNotNull(presentationTimestampsUs.remove());
|
||||
presentationTimestampsUs.remove();
|
||||
frameRenderer.dropFrame();
|
||||
}
|
||||
|
||||
private void renderFrame(boolean shouldRenderImmediately) {
|
||||
long presentationTimeUs = checkStateNotNull(presentationTimestampsUs.remove());
|
||||
long presentationTimeUs = presentationTimestampsUs.remove();
|
||||
|
||||
boolean videoSizeUpdated = maybeUpdateOutputVideoSize(presentationTimeUs);
|
||||
if (videoSizeUpdated) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user