Make MediaCodecRenderer.codec nullable

Also fix annotation style of the surrounding functions.

PiperOrigin-RevId: 288865420
This commit is contained in:
krocard 2020-01-09 11:05:36 +00:00 committed by Oliver Woodman
parent 2c02f787bd
commit 91d2b8581e

View File

@ -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;
}