From 91d2b8581e2b961997fa02b74d0cd9cef17afc5f Mon Sep 17 00:00:00 2001 From: krocard Date: Thu, 9 Jan 2020 11:05:36 +0000 Subject: [PATCH] Make MediaCodecRenderer.codec nullable Also fix annotation style of the surrounding functions. PiperOrigin-RevId: 288865420 --- .../android/exoplayer2/mediacodec/MediaCodecRenderer.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java b/library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java index 89a0cb5ae1..8b26a008d1 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java @@ -634,7 +634,8 @@ public abstract class MediaCodecRenderer extends BaseRenderer { * method if they are taking over responsibility for output format propagation (e.g., when using * video tunneling). */ - protected final @Nullable Format updateOutputFormatForTime(long presentationTimeUs) { + @Nullable + protected final Format updateOutputFormatForTime(long presentationTimeUs) { Format format = formatQueue.pollFloor(presentationTimeUs); if (format != null) { outputFormat = format; @@ -642,11 +643,13 @@ public abstract class MediaCodecRenderer extends BaseRenderer { return format; } + @Nullable protected final MediaCodec getCodec() { return codec; } - protected final @Nullable MediaCodecInfo getCodecInfo() { + @Nullable + protected final MediaCodecInfo getCodecInfo() { return codecInfo; }